News for hackers. Stuff that matters.
Re:Racketscript by eru on Tuesday November 01, 2022 @07:17AM (#33419642)
Specifically, loops are a special case (with special syntax) of tail calls for language that don't support tail calls properly.

However as great as tail calls are they can't practically implement all control flow concepts. Eg they aren't really all that great for modelling exceptions, I think.

Re:Racketscript by pjmlp on Tuesday November 01, 2022 @07:42AM (#33419881)
Fair point, however exceptions have their roots on continuations.
Re:Racketscript by throwaway17_17 on Tuesday November 01, 2022 @09:14AM (#33420718)
I would agree with sibling, and expand his comment a bit. Tail calls are just the specialization of continuation passing (or of having reified continuations programmer accessible. Actually, all control flow is the application of a continuation. So while I agree that tail calls are not used as the basis for exceptions, the parent concept of continuation passing does.