Created
December 28, 2020 20:21
-
-
Save KiaraGrouwstra/130e57acd62643e4a2e4ebcd35fefc33 to your computer and use it in GitHub Desktop.
This file contains 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
programming language as closer to math | |
no (unencapsulated*) mutation (immutable) | |
recursion | |
no (unencapsulated*) side effects (io) | |
no operators, everything is a (pure mathematical referentially transparent) function (lambda calculus) | |
* limitations can be either used by best practice (non-pure languages) or enforced (compiler can use for optimization, type guarantees) | |
strong guarantees | |
easily testable (referential transparency, short functions) | |
compiler is your friend: strongly typed: encapsulate anything in types | |
sequential operations (monads) | |
mutation | |
io | |
error handling (maybe/either) | |
ability to return one of multiple things (either, case classes) | |
enables optimizations | |
parallelizable | |
memoizing results to reduce computations | |
graph rewrites (used in symbolic math, deep learning frameworks) | |
more compiler guarantees so more can be optimized upfront | |
through composability of math, programming language as closer to human language | |
easy to write (expressive) | |
few operators but widely applicable | |
typeclasses (category theory) | |
macros (lambda calculus makes AST easy to manipulate) | |
composable | |
pure functions | |
extendible (operators) | |
look up existing functionality using search engine hoogle (thanks to types) | |
coding is iterative changing, which strong types help make safer | |
default unordered (force order by monads) | |
easy to grok (read code more than you write it) | |
short functions | |
short names | |
more like using words than using binary instructions | |
referential transparency (pure functions) | |
testable | |
local complexity over global complexity | |
don't need to read (types) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment