Monday, June 3, 2024
47
rated 0 times [  50] [ 3]  / answers: 1 / hits: 58424  / 14 Years ago, mon, october 18, 2010, 12:00:00

Just because functions are first class objects, there are closures, and higher order functions, does Javascript deserve to be called a Functional Programming language? The main thing I think it lacks is Pure Functions, and it doesn't 'feel' like other functional languages, like lisp (although thats not really a good reason for it not to be a functional langauge...)


More From » functional-programming

 Answers
201

Repeating my own answer to a similar question,




There's no accepted definition of
functional programming language.



If you define functional language as
the language that supports first class
functions and lambdas, then yes, JavaScript *is* a
functional language.



If you also consider the factors like
support for immutability, algebraic
data types, pattern matching, partial
application etc then no, JavaScript
*is not* a functional language.






I'd encourage you to read the
following related blog posts (and also
the comments below them):





[#95272] Friday, October 15, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
victorw

Total Points: 484
Total Questions: 120
Total Answers: 107

Location: Faroe Islands
Member since Thu, Apr 8, 2021
3 Years ago
;