loading...

re: Is JavaScript truly a functional language? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: What is functional programming? In Wikipedia, "In computer science, functional programming is a programming paradigm where programs are construct...
 

It's a combination of both.

Functional programming is a programming paradigm: it's a specific way of writing code, where you follow certain rules.

You can write functional programs in many object-oriented languages, such as JavaScript and Python, but these programs aren't truly functional since their constructs don't fully mesh with the framework and rules of functional programming.

That's where languages like Haskell and Clojure come in — these are purely functional programming languages that do not have the traditional OOP constructs, and force the functional programming paradigm's rules, such as never mutating state directly and always keeping functions pure.

But yes, functional programming is essentially the composition of pure functions. Rather than telling the computer how to do something, you define what the program is to do.

Code of Conduct Report abuse