2 ms·
short and sweet: Functional programming as a paradigm is "about" the following things as I understand it: 1) functions as first class citizens (this is a great
by ascendantlogic 13y ago
short and sweet: Functional programming as a paradigm is "about" the following things as I understand it:
1) functions as first class citizens (this is a great read that relates to this: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom...)
2) immutable data: mutable state is the enemy of threading/concurrency/parallelism. Things can change underneath you in unexpected ways causing unforeseen consquences. When the data never changes, this sort of thing becomes much easier.
3) Referential transparency: This is related to #2. Whenever you pass A into function Z, you get B. There's no chance of side effects or other possible outcomes. A goes in, B comes out.