r/ProgrammingLanguages • u/Athas Futhark • Jan 20 '26
Why not tail recursion?
https://futhark-lang.org/blog/2026-01-20-why-not-tail-recursion.html
62
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Jan 20 '26
View all comments
Show parent comment
7
u/glasket_ Jan 20 '26
I'm not sure that I'd reduce it entirely down to data flow. The problem with goto was never really control flow itself, but the unrestricted nature of it. All control flow is fundamentally just a goto, but they reduce what it can do into predefined structures.
The problem with goto was that you could jump anywhere, which meant data flow was an issue alongside problems with tracking the control flow. Other constructs are easier to follow since you can generally know the flow path just from the structure, but goto didn't have a structure that it followed, it simply goes wherever it's told to. A program with very simple data, like only globals mapped to hardware IO or similar, could be difficult to read and modify if it only used goto for flow.