Functional programming: Difference between revisions
Content deleted Content added
Reorganized article, added some references |
m Added TR link |
||
Line 7: | Line 7: | ||
* It's easy to '''refactor''' similar pieces of code, because any subexpression can be replaced by a variable bound at the outside. |
* It's easy to '''refactor''' similar pieces of code, because any subexpression can be replaced by a variable bound at the outside. |
||
This leads to a coding style which is very different from more traditional languages. [[Iteration]] is typically replaced by |
This leads to a coding style which is very different from more traditional languages. [[Iteration]] is typically replaced by [[tail recursion|tail-recursion]]. Lists become a very important datatype. Code often consists of a composition of simpler blocks, which makes it look similar to [[declarative programming]]. |
||
Most functional programming languages (FPLs) are related to the [[wp:Lambda_Calculus|lambda calculus]], which makes the specification of their formal semantics simpler. |
Most functional programming languages (FPLs) are related to the [[wp:Lambda_Calculus|lambda calculus]], which makes the specification of their formal semantics simpler. |