3 ms·
Does Erlang handle the stack better? In most languages this would blow up if N got big enough.
by maxxxxx 9y ago
Does Erlang handle the stack better? In most languages this would blow up if N got big enough.
- bearhall 9y agoYes. Erlang has tail recursion which helps prevent that http://learnyousomeerlang.com/recursion http://learnyousomeerlang.com/recursion
- dragonwriter 9y agoAs the article notes, what Erlang has is Last Call Optimization, this is significantly more general than tail recursion optimization.