3 ms·
> Would I have similar revelations with category theory – maybe write better abstractions? Maybe, but it's not a given. (Haskell folks might have a different v
by wenc 8y ago
> Would I have similar revelations with category theory – maybe write better abstractions?
Maybe, but it's not a given. (Haskell folks might have a different view due to their language being a closer match to the theory)
My sense is Category Theory is one of those things that is useful for explaining things in retrospect, rather than used as a constructive tool. It exposes inconsistencies in your current model, and helps clear up your thinking. John D. Cook wrote a piece on Applied Category Theory which makes the point that theory itself is perhaps less useful than the discipline of thinking categorically [1].
I think Category Theory can guide the design of certain types of tools that deal with relationships. LINQ (in C#) for instance was guided by category theory. If you wanted to come up with a new kind of SQL, category theory could be helpful in designing abstractions that are orthogonal and clean.
But the design of these types of tools remain a small, specialized domain within programming. It's somewhat analogous in my mind to metaclasses in Python: classes are sufficient for the most part, only framework developers will likely ever need metaclasses (to generate classes).
In most day-to-day programming, it seems unlikely that category theory will have as much an impact on practice as does, say, simple principles derived from functional programming. In fact, there may even be negative consequences from over-abstracting your code.
[1] https://www.johndcook.com/blog/applied-category-theory/ https://www.johndcook.com/blog/applied-category-theory/