Re:Node.js isn't a silver bullet, but it's still a bullet.
by apgwoz on Friday February 03, 2012 @03:58PM
(#3548963)
Calling JavaScript a functional language on the pure basis that it has first class functions and closures is sort of stupid. Aside from that, what other properties does JS enforce that are deemed functional?
I'll save you some time: none.
Re:Node.js isn't a silver bullet, but it's still a bullet.
by grannyg00se on Friday February 03, 2012 @06:28PM
(#3549563)
I don't generally like to say sort of stupid things, but I would call a language functional if it has first class functions and closures.
Re:Node.js isn't a silver bullet, but it's still a bullet.
by InclinedPlane on Friday February 03, 2012 @08:52PM
(#3549944)
Provide a concise, objective definition for functional languages which Lisp, Scala, Haskell, and Lua satisfy but Javascript does not.
Re:Node.js isn't a silver bullet, but it's still a bullet.
by lmkg on Saturday February 04, 2012 @03:49AM
(#3550639)
The language uses functions as the primary mechanism for implementing core language design features, such as abstraction, modularity, code re-use, and configurable behavior. Lisp, Scala, and Haskell use functions as their go-to tool, supported by macros and/or types. JavaScript uses objects and its object system as its primary tool, with functions in a supporting role.
I will concede that JavaScript supports programming in a functional style. However, if one uses that as the definition of a functional language, the term becomes nearly useless, basically excluding only Java.
Re:Node.js isn't a silver bullet, but it's still a bullet.
by apgwoz on Saturday February 04, 2012 @07:42AM
(#3550921)
You might add that Lisp (well Scheme and some Common Lisps), Scala, and Haskell provide mechanisms to make recursion equivalent to iteration without explicit looping constructs that require mutation (tail recursion).
Re:Node.js isn't a silver bullet, but it's still a bullet.
by huggyface on Friday February 03, 2012 @04:38PM
(#3549153)
My interest in having a boring argument with a language bigot approaches nil. But yes, aside from the very namesake of functional programming (a vague language grouping with no disciplined definition), yeah there's nothing else there...groan.
Re:Node.js isn't a silver bullet, but it's still a bullet.
by apgwoz on Friday February 03, 2012 @07:46PM
(#3549778)
You are correct in saying that functional programming has a vague meaning. For JavaScript, I'll accept the meaning:
functional: adj, produces a correct result
example usage: Despite its many warts, inadequacies,
somehow JavaScript is actually functional.
Being able to standardize and coalesce the two sides of the web pipeline -- regardless of what magic happened at the other layers -- has obvious merits.