Re:Functional programming in JavaScript is an antipattern
by globuous on Wednesday June 21, 2017 @08:38AM
(#14603177)
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/ (introduction)
The functional/OO split in JS is basically whether to focus on the Scheme part and only use objects as hash tables, or whether to focus on the objects, methods and inheritance and avoid Schemey functions.
You don't need any libraries to do either. If it makes life easier to include a library (whether functional or OO or whatever) then include it; if it doesn't, then don't.