Re: Good Use of GOTO
- Posted by Jason Gade <jaygade at yaho?.c?m> Jun 06, 2008
- 840 views
c.k.lester wrote: > > Jeremy Cowgar wrote: > > c.k.lester wrote: > > > But wasn't the current solution found to be superior? Putting the C code > > > directly into the interpreter for an extra 150K seemed to be the best way > > > and, thus, was chosen. > > Why should a euphoria developer not have that ability? > > It has never been demonstrated that a Euphoria developer needs the ability. > > GOTO is simply not needed in Euphoria. It's already blazingly fast enough > without adding a construct like GOTO. > > > Those developers (again who are no dummies) decided that goto was far > > superior. Please tell me why a euphoria developer should not also have > > that ability? > > Because a GOTO in C might increase performance by up to 50%. > > Show me similar performance benefits for Euphoria. > > If you can't, then GOTO should not be added because it's just useless bloat > and at least won't be around to trip programmers up. Now wait a minute -- didn't you say earlier that a 2%-5% increase was sufficient for a new feature, or was that someone else? Regardless, you can't keep moving the bar. goto can make for hard to understand code. Programmers should be encouraged to find ways to write their code without it. However, in very rare cases, it can be a useful tool. Now, I haven't used got since the 8-bit Basic days and I don't plan on starting. But I've seen enough good arguments to at least be neutral about it and I have seen some instances of C code where it's probably the best choice. Well, certainly not as many good examples as goto's partisans suggest exist, but still. See some of Jeremy's links above. -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.