Re:Finally... Goto in Javascript
by edw519 on Monday July 06, 2009 @02:45PM
(#690204)
!reflexive, I promise you. Based not on Dijkstra's paper, but my own horror stories.
[ Parent
| on HN ]
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....
...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.