Hacker News new | ask | show | jobs
by gclaramunt 3619 days ago
But category theory has direct application to programming: (ignoring non-termination), types and functions form a category and most of the concepts are directly applicable. Functors/map are of everyday use and other CT results are commonly used. Even JavaScript is getting functional, so CT is getting more relevant and practical everyday
2 comments

I love category theory, but I feel that its penetration of JavaScript or most other languages doesn't (and likely won't) get much farther than monads and functors. Many people who use functional languages don't even know about applicatives, even though monads can be viewed as a specialization them.

If you're thinking about new programming paradigms I think the theory behind CT versions is worth knowing, but if most of your monads are maybes or lists it'll be of little practical value.

> but if most of your monads are maybes or lists it'll be of little practical value.

I think even this is maybe too much: if all you use are monads and functors, then it's easy enough to learn monads and functors on their own, without any "real" category theory.

Then you should learn type theory proper. Although type theory can be expressed in terms of categories that is mostly because type theory and category theory, alongside set theory, higher-order logic, etc. are foundational theories. So even though it is applicable, concepts from type theory are much more relevant, with or without the categorial phrasing.