News for hackers. Stuff that matters.
Re:Goto (2007) by prox on Thursday October 21, 2021 @04:36PM (#28950513)
You maybe the right person to ask… Aren’t function / functioncallers a form of goto?
Re:Goto (2007) by CJefferson on Thursday October 21, 2021 @06:13PM (#28951470)
Technically yes, all code eventually compiles to goto, or goto equivalents (simplifying slightly)

However, the idea behind "goto considered harmful" is almost all code can be written with function, loops and if/else statements and get just as efficient, and much, much easier to understand.

Re:Goto (2007) by kazinator on Thursday October 21, 2021 @07:04PM (#28951890)
All goto code can be mechanically translated into a network of mutually tail-calling functions arranged into an identically shaped call graph that is hardly easier to understand.

What you can do with goto-based code is refactor it into a form that obeys certain conventions such that it is easy to mechanically translate to such a tail-call newtork, but then stop short of actually doing it.

Then when reading the code, just pretend you're looking at function calls.