Qqwy / Marten10/04/2023, 9:01 AM
which means ‘opening parenthesis that is closed by the end of the line’ which gets a bit close to the idea of a ‘super opening parenthesis’. C and GOTO: C came out after this paper, and its
statement was neutered: It only allows local jumps (remaining in the same function) and only to hard-coded labels (though a common GCC compiler extension extends this to allow dynamic labels). The closest C gets to unrestricted GOTO is `setjmp`/`longjmp`; but here the callee decides where you jump to (just like with exceptions) so you can really only jump up on the stack, making them slightly less painful to reason about. Neither gets used a lot: I mainly know the
idiom from a few of the talks of Alexei Alexandrescu in which he uses it in a hot code path because the resulting machine code is better optimized. And `setjmp`/`longjmp` is used in some places to emulate exceptions or coroutines in plain C, but whenever the OS provides higher-level abstractions to use here they are preferred (just like how OS support for threading is better than rolling your own spin-locks). EDIT: Also, love your relentless efforts to add the Dijkstra sting every time 😂. Editing this episode must have taken painfully long 🙇.
Martin10/04/2023, 9:14 AM
in haskell, if it was gone I would cry! (And implement my own)
Qqwy / Marten10/04/2023, 9:23 AM
. (F#, Scala, Elixir, Elm, PureScript, … have them).
. The Haskell version of
is known as
which is mainly useful if you want to split a long expression over multiple lines (and read it top-to-bottom).
Jack Rusher10/04/2023, 10:51 AM
turns up in many, many places where performance matters. Here are ~5 pages of hits for
in the Linux kernel, for example: https://github.com/search?q=repo%3Atorvalds%2Flinux+goto&type=code&p=1 Dijkstra could make his argument only because he didn’t do much of this kind of work.
Chris G10/04/2023, 12:47 PM
Joshua Horowitz10/05/2023, 6:26 AM
Matt Wynne10/05/2023, 7:26 PM
Where is the harm in that 🙂
10 PRINT "MATT IS ACE" 20 GOTO 10