3 ms·
>the way tail calls work in functional languages comes to mind tail call optimizations are useful as optimizations. But in a language like scheme, tail calls
by fsckboy 2y ago
>the way tail calls work in functional languages comes to mind
tail call optimizations are useful as optimizations.
But in a language like scheme, tail calls are required to be implemented as loops. If you don't do that, then people can't write code that relies on it. Scheme treats tail call handling as a semantic, not as an optimization.