r/javascript • • Oct 11 '17

JavaScript's Promise is Memory Unsafe

https://alexn.org/blog/2017/10/11/javascript-promise-memory-unsafe.html
70 Upvotes

77 comments sorted by

View all comments

1

u/[deleted] Oct 14 '17

If I understand correctly you expect TCO from a language which don't specify this behaviour.

2

u/alexelcu Oct 15 '17

I expect TCO from a library implementation, not the language, because this can be implemented at the library level and because one reason to go async is to escape the limitations of the call stack.

Also, as mentioned in the article, "proper tail calls" support is coming, having been specified in ECMAScript 6, right now being supported in Safari browsers for MacOS / iOS, so this too will go away.