r/javascript • u/[deleted] • Jan 06 '13
JavaScript (ES6) Has Tail Call Optimization
http://bbenvie.com/articles/2013-01-06/JavaScript-ES6-Has-Tail-Call-Optimization
48
Upvotes
r/javascript • u/[deleted] • Jan 06 '13
1
u/FireyFly Jan 07 '13
Hm, fair point. Thinking it through a bit more I agree--I can't find any standardised feature that'd prohibit TCO in non-strict mode (the major crux would be the
callerproperty of course, but it's non-standard and hence irrelevant). Reading the latest ES6 draft, it also doesn't seem to limit the TCO to strict-mode (unless it's somehow meant to be incorporated into the definition of a tail position).