Functional programming is a programming paradigm based upon building abstractions using functions, avoiding side effects and change of state. Pure functional programming is thread-safe.
Functional programming is a programming paradigm that deals primarily with mathematical functions. In functional languages, functions are first-class values.
Functions take arguments and return results, but typically don't mutate state. This in contrast to imperative-programming, which primarily revolves around statements that change state. The advantage of avoiding mutable state is that you can safely compose functions, and you can use algebraic laws and "substitution of equals for equals" to simplify programs or improve their performance.
One consequence of this is that many common patterns in programming can be abstracted as higher-order functions, which use a user-supplied function that implements real functionality, and apply it to data in a certain way. This can make code more concise and simpler to reason about and understand.
Functional programming has grown out of a mathematical system called lambda calculus, which was developed in the 1930s. lisp was the first programming language to be based on the lambda calculus.
Today, functional programming is getting more and more popular. The main reason for this is the provability of functional programs' properties, and security is very important nowadays. There are many use cases for functional programming, e.g. Computations or Concurrency handling. Use cases of functional programming.
Programming languages
These languages are listed in order of popularity in relation to the functional-programming
tag.
Languages that are primarily functional, although some also support mutable state or other programming paradigms:
Languages that have some functional aspects (like support for first class functions) but are not considered functional languages per se:
History and concepts
The Conception, Evolution, and Application of Functional Programming Languages by Paul Hudak.