3 ms·
I think this is spot on. The problem lies in the incompatible interfaces. I've been studying category theory recently and it is amazing how well things compos
by bcheung 7y ago
I think this is spot on. The problem lies in the incompatible interfaces.
I've been studying category theory recently and it is amazing how well things compose when interfaces follow monoidal / monad design patterns. They are so generalized that they can be used in so many different places. Unfortunately it is so rarely used outside of more academic environments.
If libraries/frameworks were structured to follow these kind of well defined "interfaces" I think we would have a very different experience than the one we have now.
- james_s_tayler 7y agohow do you make an interface monoidal?
- flying_sheep 7y agoSuch monad interfaces are best enforced by language / compiler, however it is non-tractable to do that. Even in Haskell they just move the monoid check to programmer (especially associativity). What is worse, if the law is violated in some tiny subset of the data, that can lead to non-trivial bug. That is why it is difficult to apply in real world, which is usually very complicated :-(