5 ms·
My understanding was made better when I started thinking about utilizing category theory in programming, more in a way of "here are some design patterns stolen
by a-saleh 10y ago
My understanding was made better when I started thinking about utilizing category theory in programming, more in a way of "here are some design patterns stolen from abstract algebra", rather than "man! now I should learn this entire branch of mathematics".
The branch of math itself would be mostly useless anyway, because it is mostly concerned about relations between categories, and as programmers, you usually work just within a single category, category of functions and types in your programming languages :-)
But from the practical, design-pattern viewpoint, I would suggest trying purescript :-)
My journey was working through the purescript book [1] up to the Applicative Validation chapter. And then I played around with the flare backend in try-purescript [2]. And then it clicked for me and I was suddenly able to read and comprehend Typeclassopedia [3] :-)
[1] https://leanpub.com/purescript/read https://leanpub.com/purescript/read
[2] http://try.purescript.org/?backend=flare&session=a06d83dd-d0a9-e686-4533-7f7ad9940e40 http://try.purescript.org/?backend=flare&session=a06d83dd-d0...
[3] https://wiki.haskell.org/Typeclassopedia https://wiki.haskell.org/Typeclassopedia
- alipang 10y agoI'd say there is not much point to Category Theory if we where to restrict ourselves to a single category. For instance Monoids are categories (with a single object) that is not the category of functions. Another set are the Kleisli Categories[1] that are equivalent to monads. You mention Applicative Functors, which form another (different) category where arrows from a to b are on the form `f (a -> b)` and composition and identity laws of these arrows are equivalent to the applicative laws. [1] https://en.wikipedia.org/wiki/Kleisli_category https://en.wikipedia.org/wiki/Kleisli_category
- a-saleh 10y agoI got my point about single category from a friend of mine that studied category theory and applied it to problems topology. Way he explained it, they often were searching for relations between categories that didn't at all intersect. And way I was learning the applications of category theory in i.e. haskel, I viewed it more as learning about algebraic structures in the category of haskel types and functions. So right now I have reasonable idea about i.e. applicative functors in haskel. But thinking about applicative functors as their own category is one abstraction step above what I am usually used to :-)