Comment by jhgb

2 months ago

It gives you arbitrarily complex control flow even in presence of modularity. A tail call is a state transition. Without them, you'd have to resort to a big loop (which breaks modularity), or some sort of trampoline (which works but it's a bit clumsy).

this whole thing is equivalent to a goto at the beginning of a function.

  • This is true in the same sense that function calls are equivalent to gotos at the beginning and end of the function.

  • Yes, except without all the known disadvantages of goto. That's the whole point.

    • huh? what is the disadvantage? i am very tired of people parroting some non-arguments. goto is awesome. solves TCO, multiloop breaks, switches and whole lot more