3 ms·
I thought tail calls were in the ES6 spec, just not implemented by all browsers or something. Node has a flag to use tail call optimization I believe. EDIT: ES
by globuous 9y ago
I thought tail calls were in the ES6 spec, just not implemented by all browsers or something. Node has a flag to use tail call optimization I believe.
EDIT: ES2015 specs [1]: "Some of its major enhancements include modules, class declarations, lexical block scoping, iterators and generators, promises for asynchronous programming, destructuring patterns, and proper tail calls." (emphasis mine)
[1] http://www.ecma-international.org/ecma-262/6.0/ http://www.ecma-international.org/ecma-262/6.0/ (introduction)