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

Yes. You generally just should not write a recursive function in a language without TCO/TCE.


Recursion is nothing but a loop with a stack. So yes, can certainly rewrite things that way, but all you're doing is trading the stack for a stack structure on the heap.




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

Search: