https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.p...
https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.p...
I will say GOTO's work well for exception handerling, but still doable without. But for speed, though less of a factor today, it still translates as faster code at the low level of CPU runs.
But then, things move on and you will always have that wave of what students are taught being cutting edge compared to what is actualy in use in work. A friction many would have encountered in one form or another, even today. Be it style, design or language/tools choice. What is the best today, may well be outdated tomorrow, but you have to maintain that legacy investment and it is often too costly/risky to rewrite that legacy for something that itself could be legacy the next day.
So as for harmful, well they can spagetti up code if used badly, yet that comes to many approaches and if they are that bad, why do CPU's still have JUMP instructions you could counter-argue.
Oh and well played on the humour.
Machine code is linear and executed one instruction at a time. It does not have the concept of blocks, so there is no way to have structured programming. Jumps are the only way to create a loop or conditional.
Only conceptually. In reality, it's executed out of order and branches are run in parallel.
E.g, the simple switch statement has several possible machine-code implementations that compilers will switch (heh) between, depending on the characteristics of the cases.
Of course, if you are going to JIT compile the bytecode, that'll usually be a lot faster. But at that point you're changing one form of low-level wizardry for another.
[1] https://eli.thegreenplace.net/2012/07/12/computed-goto-for-e...
Here's the equivalent Reddit thread; better suited for this sort of comment:
https://www.reddit.com/r/golang/comments/a1j3h6/go_2_here_we...
That's how I figured out the joke too - that plus the start of the comment :)
this is the new Reddit
I don't get why some people here are so against humour. I appreciate the high standards for jokes and expectation of high signal:noise, but this was clever and topical.
> In 1968 the Communications of the ACM published a text of mine under the title "The goto statement considered harmful, which in later years would be most frequently referenced, regrettably, however, often by authors who had seen no more of it than its title, which became a cornerstone of my fame by becoming a templace: we would see all sorts of articles under the title 'X considered harmful' for almost any X, including one titled "Dijkstra considered harmful."
> But what had happened? I had submitted a paper under the title "A case against the goto statement, which in order to speed up its publication, the editor had changed into a 'Letter to the Editor', and in the process he had given it a new title of his own invention! The editor was Niklaus Wirth".
https://www.theregister.co.uk/2002/08/08/edsger_dijkstra_rip...
Also: Why Functional Programming Matters
and
Why Why Functional Programming Matters Matters
Edit: Just saw the sibling comment by Stratoscope:
"we would see all sorts of articles under the title 'X considered harmful' for almost any X, including one titled "Dijkstra considered harmful."
:)
"Considered Harmful" Essays Considered Harmful
There's a good video talk by him titled something like "The Last Thing D Needs".
Dijkstra would lambast you for that error :-)
But I just quoted the linked PDF a few comments above in the chain.