Re: New keyword added: continue
- Posted by Matt Lewis <matthewwalkerlewis at gmail.c?m> May 28, 2008
- 782 views
Jeremy Cowgar wrote: > > If goto is not good for the standard libraries than it's not good for the > language. If it is good for the language than it's good for the standard > library. I see no exceptions to this rule. Why would we add language > functionality and then ban it from use? If we have the idea it should be > banned, then it shouldn't be added! If we think it should be added then we > cannot/should not ban it's use! That's a good general principle, but not necessarily true for every case. One place where goto can be a lifesaver is in porting code from other languages that either have goto, or have other flow control structures that we don't. Goto emulation in these cases can lead to really messy code that's technically structured code, but the mess of nested ifs and flags can make a giant knot that could be cut with a well placed goto here and there. They can also be used in certain cases to great effect in optimizing (take a look at the back end of the interpreter :). I accept that some view this as insufficient reason for adding goto. I happen to disagree with them. Matt