ad-hoc abstraction is the secret sauce that destroys code bases in the long run and makes things horrendously complex. Composition based on mathematics is more likely to survive years of serving as atomic elements than anything based on ad-hoc human intuitionComposition is hard
veddox|3 years ago
belmont_sup|3 years ago
In Haskell or other typed fp languages, you have all these well-recognized and well-used typeclasses and their attached methods, conceptually equivalent to generic interfaces in c#/java. It's easier to adapt new data structures into these interfaces and have all your existing functions immediately work with them.
The "mathematics" part here is that these typeclasses are backed by category theory that prescribes their behaviors.
There are plenty of random readings you can find, so I won't recommend them. Someone's bound to argue with me on what's a better entrypoint.
I do want to note that you don't need to use haskell or an fp language to use these concepts. Example: a complete set of fp data structures in typescript https://gcanti.github.io/fp-ts/modules/. It's just that fp languages make using them much easier because of their type system.
ogoparootbbo|3 years ago
https://doisinkidney.com/posts/2017-10-13-convolutions-and-s...
jeffreygoesto|3 years ago
nuc1e0n|3 years ago