For the record, many implementors are against STC and PTC for a few reasons:
- It may be significantly slower than regular recursive calls (though this claim seems to be false both in practice and theory)
- It may break debug tools
- It may break browser telemetry (especially on IE)
Additionally, they would have to decide on an explicit syntax for STC (return.tail or something like that).
Personally, I would love to see STC anf PTC land so I can write proper functional code in JS. It would also make functional programming in JS easier to teach (less gotchas).
Comments
For the record, many implementors are against STC and PTC for a few reasons:
- It may be significantly slower than regular recursive calls (though this claim seems to be false both in practice and theory)
- It may break debug tools
- It may break browser telemetry (especially on IE)
Additionally, they would have to decide on an explicit syntax for STC (return.tail or something like that).
Personally, I would love to see STC anf PTC land so I can write proper functional code in JS. It would also make functional programming in JS easier to teach (less gotchas).
See TC39 discussion: https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-...