Re: Conceptual problem solved by GOTO
- Posted by Jeremy Cowgar <jeremy at cowgar?com> Jun 06, 2008
- 728 views
Jason Gade wrote: > > As for you DSL example? I have no idea as I've never written anything in a DSL > and have zero experience in them. Are gotos common in DSLs? If so, why? > Yes, goto's are very common the reason is simplicity. I push onto the "jump" stack a label when, say a while is started, and when a continue is hit, I access the stack, when an end while is hit, I pop from the stack, etc... It's much easier to translate using goto than trying to map all sorts of custom logic to set structures. Now, you can easily map any code of my code by hand to existing structures, but try to do it automated and maintain reliability. -- Jeremy Cowgar http://jeremy.cowgar.com