Wim Jongeneel
Aug 19, 2021

I think that it is good to say that the goto-considered-evil movement was mainly about unchecked goto-statements that jumped to other functions (or procedures back then). And that was very dangerous as there was a very big change you left half a stackframe in memory behind, and that in a language with 60's/70's memory management.

And while I wouldn’t recommend goto for any high-level business logic, it is indeed very true that many high-performance algorithms require jumps to labels to get to most performance out of the machine. And it is kinda of the same story for named continues and break statements.

Wim Jongeneel
Wim Jongeneel

Written by Wim Jongeneel

Software Engineer at Mendix (Rotterdam, The Netherlands) • Student MSc Software Engineering • Functional programming enthusiast

Responses (1)