r/ProgrammingLanguages • Futhark • Jan 20 '26

Why not tail recursion?

https://futhark-lang.org/blog/2026-01-20-why-not-tail-recursion.html
62 Upvotes

34 comments sorted by

View all comments

Show parent comment

15

u/flatfinger Jan 20 '26

In the era when gotos were considered "harmful", code like the following would have been considered "normal":

570 IF X=Y THEN 2910
580 ... code that should run if X wasn't Y
...
640 ... code that should run regardless of whether X was Y
... continued
... then a bunch of code that had nothing to do with the above
2910 ... code that should run if X was Y in the above comparison
...
2980 GOTO 640

Such code would be considered obfuscated by today's standards, but back in the late 1960s and early 1970s that's how BASIC programs were typically structured, leading to both the "BASIC considered harmful" and "GOTO considered harmful" notions.