Why do people keep incorrectly insisting that JavaScript is "functional" or "Scheme-like"? It is neither.
Merely having anonymous functions does not make a language "functional". JavaScript does not encourage the use of pure functions. It does not encourage the use of recursion. It does not encourage immutability. It does not have a robust, sensible type system. It does not encourage currying.
It's pretty clear that JavaScript is inherently not a functional programming language. It goes against functional programming techniques in almost all respects, especially when it comes to JavaScript code that's out in the wild.
Comments
Why do people keep incorrectly insisting that JavaScript is "functional" or "Scheme-like"? It is neither.
Merely having anonymous functions does not make a language "functional". JavaScript does not encourage the use of pure functions. It does not encourage the use of recursion. It does not encourage immutability. It does not have a robust, sensible type system. It does not encourage currying.
It's pretty clear that JavaScript is inherently not a functional programming language. It goes against functional programming techniques in almost all respects, especially when it comes to JavaScript code that's out in the wild.
"JavaScript does not encourage the use of pure functions."
Neither does Lisp.
"It does not encourage the use of recursion."
Neither does Lisp. (Common Lisp has no tail recursion in the spec.)
"It does not encourage immutability."
Neither does Lisp. (Actually, ES5 does have pretty powerful primitives for immutability, Object.freeze for example.)
"It does not have a robust, sensible type system."
If you mean static typing, neither does Lisp.
"It does not encourage currying."
Neither does Lisp.
sensible type system means you cannot add string and numbers.
Functional language != ML-family language.
Yes, but we can also say that functional language != Lisp-like language, and Javascript may be functional, but it is not Lisp-like.