The promises of functional programming



This article has been written by Konrad Hinsen. It talks about the history of programming languages and explains why functional programming is different from traditional programming.
Programming has changed a lot and will continue to evolve: with all the new technologies that appeared over decades, new languages have been created (through assembly language to problem-oriented programming languages). Needs have evolved, programming languages have multiplied and programming approaches also: Functional programming has been growing in interest because it is considered more robust, compact and easily parallelizable (this means that computational tasks are divided into multiple communicating processes running in parallel) and testable. It is the realization of computations by composing functions (with input values and output values), but functional programming does not have variables because functions are not supposed to change any variable; and uses recursion instead of loops.

Functional programming uses algorithmic abstractions in the form of functions, which it considers as data. Functional programming is considered to be a promising language to deal with the issues of concurrency and parallelism although it must be said we are not yet at the stage of automatic parallelization due to compiler technology lagging in capabilities. 

There are different types of functional programming languages in terms of unavoidable side effects: the pure languages (no side effects: no mutation of local static variables or input-output flows for example) and the impure languages (use of side effects fully). Some example of functional languages: Lisp (impure programming language often used in artificial intelligence), the ML family (statically typed and impure), Haskell (a pure language). 





Commentaires

Posts les plus consultés de ce blog

Rich Hickey on Clojure

The roots of Lisp by Paul Graham