3 ms·
I found it enlightening at why GOTO is considered harmful by programming in BASIC as a kid. Oh-oh spaghetti-oh! Not that you should waste your time programmin
by mattmanser 14y ago
I found it enlightening at why GOTO is considered harmful by programming in BASIC as a kid.
Oh-oh spaghetti-oh!
Not that you should waste your time programming in a GOTO dependant language, but it becomes pretty obvious after a couple of days why GOTO sucks.
The opening article is pretty vacuous imo. That's not really a legitimate use, it's just that C++ doesn't support finally.
- defrost 14y agoThe language is C, not C++, and it is in no way GOTO dependant. The examples given are ones of considered and deliberate use of GOTO by choice in a systems programming context. John Regehr knows his stuff and generally expects the same of his readers. Given his background as a harsh but fair critic of the ragged edges of the C Language standard the part of interest here is that he lets these examples go under the umbrella of "fine by me" That you found the article vacuous in your opinion is no surprise, at a guess I'd ascribe that to general ignorance on your part as born out by the comment you made. Never mind, you can rectify that with a bit of applied effort.
- mattmanser 14y agoI'm sorry, perhaps you can share what profound take away you gained from this article which boils down to 'my language doesn't have feature x. So shitty feature y is really meaningful'? Perhaps you could write an article about the usefulness of Option Explicit in vbscript to really underline the take away here. I'd love to see you defend the claim that [goto] has a number of legitimate uses in well-structured code including an idiom seen in systems code Defend that odd statement and you might have a claim on the superiority you're fatuously exuding. Personally I haven't seen a goto in live code apart from C for about 8 years. But perhaps I'm too durr hurr stupid to notice in the hundreds of different programs I've read.
- defrost 14y ago> this article which boils down to 'my language doesn't have feature x. So shitty feature y is really meaningful'? Actually that's not what this article is about at all, it's a small part of a much larger arc about C, C semantics, and LLVM. As I pointed out, you're ignorant of this. > Perhaps you could write an article about the usefulness of Option Explicit in vbscript to really underline the take away here. Irrelevant and unconnected. > I'd love to see you defend the claim that [goto] has a number of legitimate uses in well-structured code including an idiom seen in systems code No need, it's an argument that's been covered already, probably before you were born. As others have pointed out even Dijkstra conceded it's (appropriate) usefulness, he simply wished to promote structured code and the (at the time) endemic bad use of GOTO. > a claim on the superiority you're fatuously exuding. Just experience, and seemingly more than yours. > But perhaps I'm too durr hurr stupid to notice in the hundreds of different programs I've read. While I originally inferred ignorance and not stupidity on your part I concede that you are making a strong case for the latter.
- DanBC 14y ago> probably before you were born. "Goto Considered Harmful" was published by the ACM in 1968. I'd love to see accurate numbers for ages of HN reader and HN posters.
- defrost 14y agoJust make a post about BBC micros, VIC-20's, tape drives, punch cards, Commodore-64's, PDP-11's et al and watch the old farts crawl out of the woodwork ... :) I started out with a breadboard jury rigged Commodore PET and progressed to optimising symbolic math routines for group theory calculations on a Cyber-205 .. it got better after that. The GOTO debate raged hot until at least the early 80's and seems to have remained on simmer ever since.