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

Actually, I've recently watched a talk by Guy Steele where he makes a case for tail call elimination being essential for object orientation: <https://www.youtube.com/watch?v=0hlBkQ5DjaY>. He demonstrates how tail call elimination enables better separation of concerns, allowing you to write code where objects don't need to "peek" into one another.

Another non-functional application of tail call elimination is finite state machines. Writing them as functions calling the next state in tail call position is very elegant, legible and efficient.



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

Search: