
Category theory for computing science
by Michael Barr · first published 1990
7mentions
5recommended by
7HN commenters
2010–2025first – last mentioned
71% recommend29% neutral
Why HN recommends it
Treats category theory from the basic axioms with exercises and substantial content, often cited as the most approachable starting point for applying it to computing science; available free online.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.



…https://ncatlab.org/nlab/show/relation+between+type+theory+a... A different version of this is specifying the mathematical meaning of program execution in terms of directed-complete partial orders which are fruitful to think of categorically. I think Category Theory for Computing Science is the most approachable starting place for that perspective (https://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf) - As core abstractions for programming. While you can reason about programs and programming…
on “Emily Riehl is rewriting the foundations of higher category theory” ↗It first clicked for me when reading Barr and Wells' Category Theory for Computing Science [0], but I don't know about your mathematical background. Category theory is algebra, so it's probably advisable to study basic group theory before tackling category theory. (I have a hard time seeing…
on “Monads Made Difficult” ↗Try the free online textbook Category Theory for Computing Science by Michael Barr and Charles Wells [1]. It's a true textbook with exercises and lots of content. [1]: http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf
on “Monads Made Difficult” ↗…terms). For example, you could define a rules system in a fuzzy logic and have the right code be automatically generated using the library. The second is less concrete, but probably more eyeopening. 'Category Theory for Computing Science' by Barr and Wells starts from the basic axioms of a category and ends with defining all sorts of interesting patterns for software modularity based on diagrammatic reasoning (a common tool in category…
on “The category design pattern” ↗I'd add to that a complementary text by Barr and Wells: Category Theory for Computing Science (Revised 2013) http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf
on “An invitation to category theory” ↗I don't think there is anything particularly brilliant. There's Category Theory for Computing Science by Barr and Wells (http://www.case.edu/artsci/math/wells/pub/ctcs.html), which is a good enough book but hardly comprehensive. I don't know any way round the fact that category theory is difficult to…
on “Mathematics for Computer Science” ↗Category theory is actually a ‘simplified’ graph theory, i.e. you can see categories as a restricted class of graphs. E.G. ‘Category Theory for Computing Science’ introduces categories this way (a category is a directed graph with associative composition and identity; the free category on a graph is the graph with all identities and compositions filled in). But…
on “Category Theory Illustrated – Natural Transformations” ↗