The Goto Apostasy

Wed 3/11/2020 11:21 am.

if ((condition1) and (condition2))
or
((condition3) and (condition4))
then
do_something();

example 1.


versus


if ((condition1) and (condition2))
goto TEST2;

if (condition3) and (condition4))
goto TEST2;

goto DONT_DO_ANYTHING;

TEST2:
do_something();

example 2.

All in the beautiful and lovely antique Delphi Pascal language. ... Tragically, the GOTO code is longer, more verbose; it’s not terse. But I prefer it; I don’t think terseness is actually the highest possible human value. ... At the very least, example 2 is easier to debug; breakpoints can be conveniently set at the GOTOs. And after staring at something like example 1 for a few weeks, off and on to be sure, I’d say example 2 is easier to understand.

Of course I’m wrong. That’s why my view is apostate and I can be shunned by all right-thinking software gurus and their acolytes. ... The usual complaint about GOTOs is the “goto theDarkSideOfTheMoon” problem, where hideous spaghettic code loses the pitiful programmer in a dark frightening maze of GOTOs. ... Unlike “theDarkSideOfTheMoon()” function call, which’ll infalliably return, at least when the world is made anew at last, all shiny and beautiful — if not sooner....