3 ms·
You must be in quite the functional bubble (I envy you for that, though)
by doliveira 5y ago
You must be in quite the functional bubble (I envy you for that, though)
- adenozine 5y agoJust Ruby... I use Python plenty, just not in large enough doses that I have to actually make peace with it.
- yakubin 5y agoActually, 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 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.
- nine_k 5y agoES6 used to require tail call elimination, and it was even shipped by Safari and Chrome back in 2016. Were it not for Firefox and Edge teams who torpedoed that feature, it would be a part of the major language of today. Maybe it still will be.