Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One argument I heard some time ago for V8 not implementing TCO is that it results in bad stack traces for debugging.


Conceptually, a tail recursive function represents the body of a loop and we wouldn’t expect a stack trace from a loop either, so this is less of an issue. Am I seeing this incorrectly?


This is correct, however JS/Python pundits expect a stack metaphor when debugging even with an iterative process which can execute in constant space. This leaves us with trampolines as Guido prescribes [1].

[1]: https://neopythonic.blogspot.com/2009/04/final-words-on-tail...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: