Re: Conceptual problem solved by GOTO
- Posted by Matt Lewis <matthewwalkerlewis at ?mail?com> Jun 06, 2008
- 758 views
Jason Gade wrote: > > Jeremy Cowgar wrote: > > > > You did not address the rest of my message which was the real reason. As > > Euphoria > > does translating to C, I *need* to do translating to Euphoria. *I* will > > never > > look at that translated code. domain languages is a very common pattern that > > saves huge amounts of time in many peoples applications. > > > I never said you couldn't use goto. You can see that I've been relatively > neutral > in this discussion and my official vote is "abstain". > > However, when I see an argument with which I disagree I still feel compelled > to answer it. > > 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? I think that what he's saying is that he wants to write a DSL to euphoria translator, not that his DSL has gotos (though it might). Just like with the euphoria translator, you might have incompatible datatypes, for example, which make it impossible to write a general for loop, for example, without using goto. It's often easier to write code that does explicitly what higher level constructs implement (i.e., the initialization, condition checking and iteration of a for loop). Having goto gives lower level control to the programmer, which is basically why it's so easy to make spaghetti code with it. Matt