4 ms·
I learned a little bit about Category Theory a few years ago. My favorite book on the subject was this one: http://www.amazon.com/Category-Computer-Scientists-
by yodsanklai 12y ago
I learned a little bit about Category Theory a few years ago. My favorite book on the subject was this one:
http://www.amazon.com/Category-Computer-Scientists-Foundations-Computing/dp/0262660717 http://www.amazon.com/Category-Computer-Scientists-Foundatio...
Concise and clear, with examples that should speak to computer scientists.
However, I've always failed to see the practical interest of categories. It's nice to see how various things can be described or defined in a categorical framework. It may shade new light on some concepts, but I didn't see any useful theorems you could apply (like in vector spaces for instance). Probably I didn't go deep enough.
- JadeNB 12y ago> However, I've always failed to see the practical interest of categories. It's nice to see how various things can be described or defined in a categorical framework. It may shade new light on some concepts, but I didn't see any useful theorems you could apply (like in vector spaces for instance). Probably I didn't go deep enough. Almost by definition, you can't see the point of category theory until you go deep enough. Because statements in category theory are, in a very profound sense, statements about everything, they must logically be less substantial (or at least no more substantial) than statements about any particular thing. If that is so, then why bother making these less substantial statements? The point is precisely that they do apply to everything, so that your knowledge about categorical statements pertaining to vector spaces instantly translates to knowledge of exactly the same statements about groups, or modules, or … whatever (as long as the relevant categories satisfy the same hypotheses). That is, from my point of view at least, the utility of category theory is almost never in what it has to say about any one discipline, but rather the connections it makes, or at least the 'automated transfer of knowledge' that it allows. EDIT: Also, I think that, much like the monad tutorial profusion, the large number of resources for learning category theory makes people think that they are obligated to go out and find a use for it. I think one is much less likely to be successful with the mindset "where can I use category theory?", and much more likely to be successful with the mindset "I have this language in my lexicon, and so will recognise the opportunity to speak it when it arises."
- tel 12y ago> "I have this language in my lexicon, and so will recognise the opportunity to speak it when it arises." Oh, I like that a lot! It's a great way the value of both "getting" CT and "getting" monads.
- gclaramunt 12y agoYou don't need to go deep. Types and functions (ignoring non-termination) form a category. Functional programming (Haskell programmers in particular) uses many results from it. e.g. building any "container" type (collections, options, futures,etc..) is the mapping of objects of an (endo) functor, the mapping of functions is given by fmap/map As an example, just from the functor laws you get map (f.g) = map f . map g Natural transformations between functors gives you parametricity and "theorems for free" Another result that's used directly is the CoYonneda lemma (but I'm still trying to understand it :) ) The point is: category theory in spite of being totally abstract offers many interesting results that can be applied to day-to-day coding :)
- ihm 12y ago> Natural transformations between functors gives you parametricity and "theorems for free" Could you elaborate? This is something everyone always talks about but I've never really seen a proof/precise statement.
- gclaramunt 12y agoThe "Theorems for free" paper is here: http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf ( I guess is the most precise you can get :) )
- tome 12y ago> Types and functions (ignoring non-termination) form a category Even including non-termination they form a category.
- gclaramunt 12y agoTrue, if I recall correctly, having bottom everywhere just complicates things without adding much value.
- tel 12y agoIt just means that you have a category where the objects are CPOs instead of sets or types or whatever. It can actually add a whole lot of value to describing the laziness story.
- talideon 12y agoMight as well point out the availability of this: http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf