4 ms·
What software issue does category theory and abstract algebra solve? Don't get me wrong, it's cool and it has expanded my appreciation and understanding of mat
by throwaway518365 6y ago
What software issue does category theory and abstract algebra solve?
Don't get me wrong, it's cool and it has expanded my appreciation and understanding of math. But I just don't see what engineering problem it's solving besides mathematical elegance.
If you're thinking monads and IO -- separating side effects is nice and useful, but it doesn't solve any real problem IMO. It's not like people are losing sleep because they don't know which code is side effecting. Side effects are where a lot of engineering complexity is, but IO doesn't wrangle it much better than anything else. Maybe Erlang does the best job at it IMO.
And plus monads don't compose. Algebraic effects (ie multicore Ocaml), or even Actors, does "IO" in a better way without the math jargon.
- yakshaving_jgt 6y ago> It's not like people are losing sleep because they don't know which code is side effecting I’m pretty sure many people are, since this will be a likely cause of them losing money in their businesses. They could be losing money directly, and they could be losing money as a consequence of having to invest more developer time in solving unexpected effectful behaviour. In fact, I can think of one comedic case where a programmer literally lost sleep because he programmed his garage door to respond to HTTP GET requests, instead of POST requests which are conceptually meant to be the ones that are effectful.
- hopia 6y agoI always found the IO barrier a good distinction at code level. In fact, I started to work on something to that end for Elixir because of it. Monads come with their own share of problems that's true. Composability isn't really one of them in my opinion though, we got transformers for that purpose.
- tome 6y ago> What software issue does category theory and abstract algebra solve? They address (not solve) the problem of lack of code reuse. I have never seen a language where I can put to use so much code written elsewhere without knowledge of my particular use case. They also address the problem of reasoning about the behaviour of code being difficult.