Last active
January 10, 2020 14:02
-
-
Save poscat0x04/f3fd0f1e7f09384f14d0fc849b05a600 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is my philosophical argument on why functional programming matters. | |
1. Abstraction | |
Functional programming unlocks a whole varieties of abstractions (monads, arrows and profunctors for example) that are meaningless to | |
mimic or impractical and unable to implement in imperative languages. These abstractions help us to tackle and understand a complex | |
software system to effectively reduce the complexity | |
(insert notation as a tool of thought citation) | |
2. Constraints | |
Funcitonal programming let us specify what exactly a program can do and cannot do -- type signatures, class constraints, dependent types, | |
algebaric data types, seperation of pure and impure, refinment types... These can help us (with the aid of a compiler) to eliminate | |
as many errors as possible at compile time. | |
3. Modularity and Composability | |
Functional programs are highly composable and modular and thus reusable. [why fp matters] Some examples are parser comibnators and | |
software transactional memories | |
4. Theoretically simple | |
Functional programming languages can be formalized easily with type theory. | |
These categories are not orthogonal to each other and there are some overlaps (parametric polymorphism for example can fit into both 2 and 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussions are welcomed