News for hackers. Stuff that matters.
Re:It Can Happen to You by ThatGeoGuy on Thursday March 04, 2021 @01:01AM (#26339158)
Not exactly. This is more an artefact of language design.

If you convert everything to continuation passing style, then every function call, tail call, recursion, etc. is just as expensive (and expressive) as a GOTO. This is, incidentally, the main "trick" or lightbulb moment in the classic Cheney on the MTA paper by Henry Baker [1].

Now if we're talking specifically in C, then absolutely! But while this intuition holds for C, it's not always true and doesn't have to be always true.

[1] https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.54...

Re:It Can Happen to You by jbluepolarbear on Thursday March 04, 2021 @02:57AM (#26339860)
That was a really good short read.