12 ms·
I know, I know; I've read bad code too. But I've also read plenty of bad code in languages that don't have goto. Copy-and-paste coding and reckless abuse of g
by tc 17y ago
I know, I know; I've read bad code too. But I've also read plenty of bad code in languages that don't have goto. Copy-and-paste coding and reckless abuse of globals are worse and more prevalent than goto abuse in my experience.
Besides, I object to bondage and discipline in a programming language. If people don't have guns, then they'll use....
- benmathes 17y ago...a baseball bat, which while possible of inflicting terminal injuries isn't quite as good at it, lowering the number of deaths. The analogy still holds :-) edit: I mean to say literally that GOTOs certainly are useful, but are far easier to create spaghetti code with than something much safer like functions. It's a cost/benefit analysis.
- eru 17y agoI can code perfectly fine (and mind-blowing) spaghetti code with call/cc, too.