Functional programming is a paradigm.
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the imperative programming style that emphasizes changes in state.
It is directly opposed to imperative programming, which is the most commonly used programming method (Java, C#).
In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way as the imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands for the computer to perform.
The main difference between imperative and functional styles lies in their relation to mathematics. Functional programming is rooted in a mathematical framework. It is able to provide a high-level description of your tasks. With imperative programming on the other hand, you define the machine state by hand: store a value, load another one,… The functional high level of abstraction allows for many improvements.
Today the following companies use functional programming:
- Microsoft has developed F# based on OCaml. It is now a first class language in Visual Studio 2010
- Ericsson has developed Erlang
- Intel uses OCaml