5 ms·
I recently read Knuth's paper "Structured Programming with GO TO Statements", which I highly recommend to anybody like myself who never wrote code using GO TO.
by jf 10y ago
I recently read Knuth's paper "Structured Programming with GO TO Statements", which I highly recommend to anybody like myself who never wrote code using GO TO.
These days, we all understand why GO TO is bad. However, in this paper, Knuth does a good job at explaining ways that GO TO can be good. I found that the paper took time to get through, but was well worth the effort.
Here is a link to the paper: http://pic.plover.com/knuth-GOTO.pdf http://pic.plover.com/knuth-GOTO.pdf
- deckard1 10y ago> These days, we all understand why GO TO is bad. Having worked in the JavaScript-github-npm-node-environment-complex the last few years, I feel what Dijkstra had against GOTO has largely been lost on the current crop of CADTs (https://www.jwz.org/doc/cadt.html https://www.jwz.org/doc/cadt.html). The spaghetti is stronger than ever today. Downvotes if you want. I've actually used GOTO before there was an option not to.
- Natsu 10y agoMy first programming languages were Apple (and Microsoft's) BASIC, which I didn't do very much with, and the Casio BASIC (with which I did quite a bit). So there was a time when it was the only type of flow control I understood and going to C with these newfangled looping constructs was new and interesting because I understood just how useful they were compared to the GOTO statements I had needed to structure so carefully before.
- kbenson 10y agoIf you're implying that callbacks are the GOTO of our day, and if you aren't careful it results in code that devolves into into a horrible mess where it's hard to determine the control flow, you aren't going to hear any dissent from me.
- deckard1 10y agoCallbacks are merely one aspect of it, but yes. I've had way too many days of debugging webpack/browserify/react/jquery-whatever nonsense that leads to stupid dead-end threads on stackoverflow or the issues tab in Github. When you're debugging an 8th-party connector library that allows the 3rd-7th party piles of github crap to integrate into your app, and you find yourself stuck in the goddamn issues tab on Github to find the solution to your highly specific problem, something is wrong. It's time to throw it all away and start over.
- x0 10y agoHaha, that link seems to redirect me to http://i.imgur.com/32R3qLv.png http://i.imgur.com/32R3qLv.png
- eumoria 10y agoyea i guess that's the joke. very specific hatred going on in that breakfast testicle
- tlrobinson 10y agoCopy-paste the URL to avoid the HN referrer redirect. I find it pretty ironic he calls HN users "man-children" by redirecting us to this image, but oh well. I think it would be pretty amusing if HN automatically proxied links to his site through norefer.com or similar.
- iokanuon 10y ago>norefer.com <a rel="noreferrer" https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer https://html.spec.whatwg.org/multipage/semantics.html#link-t...
- andrepd 10y ago>1974
- eru 10y agoCompare `Debunking the 'Expensive Procedure Call' Myth, or, Procedure Call Implementations Considered Harmful, or, Lambda: The Ultimate GOTO"' http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-443.pdf http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-...