Skip to content

Instantly share code, notes, and snippets.

@poscat0x04
Last active January 10, 2020 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poscat0x04/f3fd0f1e7f09384f14d0fc849b05a600 to your computer and use it in GitHub Desktop.
Save poscat0x04/f3fd0f1e7f09384f14d0fc849b05a600 to your computer and use it in GitHub Desktop.
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)
@poscat0x04
Copy link
Author

Discussions are welcomed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment