|
|
|
|
|
by LewisJEllis
3707 days ago
|
|
I'm not on TC39, but I sit next to and work closely with people who are, and my understanding (confirmed by this article) is that the primary concern is about stack traces of existing code, specifically code with function calls in tail position. With implicit tail call elimination, those stack traces will change in non-trivial ways that could affect debugging processes or break existing tools. I've also heard some concerns about implementation difficulties, but I know at least one major engine has implemented PTC as specified in ES2015 without issue. I think (and hope) these concerns are secondary to the discussion about stack traces and backwards compatibility. tl;dr: as with almost every "why is it like that" question about JavaScript, the answer is "because backwards compatibility". (I also started with Lua and have adjusted to JS over the years; they have more in common than many people realize!) |
|