Hacker News new | ask | show | jobs
by nabla9 1458 days ago
Also. Final Words on Tail Calls http://neopythonic.blogspot.com/2009/04/final-words-on-tail-...

Outside pure functional languages, I think the best way to implement them is to have explicit tail call declaration for functions and/and tail positions and ability to disable them for debugging (or have debugger aware of them).

This way you can actually use them to implement useful stuff and rely on them. You get a compiler error if tail call can't be implemented.

1 comments

> Outside pure functional languages

Erlang isn't pure, and has tail calls without an explicit syntax.