Hacker News new | ask | show | jobs
by hajile 1467 days ago
This is simply untrue in practice.

Almost 52% of mobile web traffic in the US is iOS/Safari which implements proper tail calls. Despite this, we don't get constant stack overflows.

A little more than 1 in 9 use desktop Safari which also implements proper tail calls. We also don't see stack overflow issues here either.

2 comments

It would be the other way around, you'd get the stack overflow issues in non-Safari browsers.

But because nowadays nobody is coding with TCO in mind, there are no such issues.

What paulhodge is pointing out is that once people start coding with the assumption of TCO, then issues crop up when someone changes a tail call into a non-tail call (or, a browser that doesn't implement TCO runs the program).

But right now, unless you are developing exclusively against safari, you can't depend on getting TCO. If all browsers implemented it, you could, and you get the performance cliff.

Maybe the performance gains are worth it, but the current situation doesn't really refute the claim that it could be a problem.