News for hackers. Stuff that matters.
Re:GOTOphobia Considered Harmful (In C) by josephg on Monday February 27, 2023 @12:34AM (#34953383)
> The type of spaghetti code "goto considered harmful" was reacting to is basically impossible to create anymore, so anyone who didn't work on that type of code in the 80s or earlier probably hasn't seen it.

Its still quite possible in assembly, where goto (JMP) is your only way to do control flow. But I doubt there's many people left who write and maintain large assembly programs. I imagine most programmers reach for C or something higher level as soon as the program becomes non-trivial.

I still use this cute online Intel 4004 simulator sometimes when I teach programming:

http://e4004.szyc.org/

Its a fun challenge for novice or advanced programmers alike to write little programs in assembly for a CPU from 1971. The assembly language[1] is only 45 commands, and you only need a handful of them anyway. The CPU interpreter is simple enough you can literally see it think.

[1] http://e4004.szyc.org/iset.html

Re:GOTOphobia Considered Harmful (In C) by jjav on Monday February 27, 2023 @02:53AM (#34954080)
> Its still quite possible in assembly, where goto (JMP) is your only way to do control flow.

Yes, certainly very possible in assembly as it ever was. But as you note, few people are doing large scale assembly programs anymore. And I'd say that those who still do, are sufficiently experienced to avoid unstructured jump explosion in their code, hopefully.