I learned my category theory fifty years ago, a decade before I wrote even a line of code (it was in FORTRAN 4), and could not have imagined them coming together. I hope the book appears before I drop off the twig.
This is the third time I go through this material. The first two times I used the blog posts from which this book is compiled. I believe that the first time I got as far as Ends and Coends. At that point, I could no longer make sense of what I was reading.
After a pause, I decided to start anew, but again ground to a halt.
When the book came out, I decided to give it a third chance. I've been reading it systematically for months now, and even trying to do most of the exercises.
Part One is great, but I struggled with Part Two. Part Three has some great content on comonads and F-algebras, but on the other hand, I find the chapters from Ends and Coends and forward to be near-incomprehensible.
I can't shake the feeling that category theory is just an elaborate hoax, but of course it isn't. It has, however, been called abstract nonsense and identified as the only mathematical discipline where even the examples could be improved by some examples.
What bothers me is the amount of hand-waving often required to 'prove' things. It may be that I'm just too stupid or lack sufficient education, but once the contents stray off the path of programming, I find it hard to follow.
In the parts that I liked, the book makes a good job of mapping theory back to programming. Most of that is clear and illuminating.
There's a pattern to the content I found difficult. These are all the chapters where there's no programming content.
While I tried to do most of the exercises, I have to admit that I gave up on that after chapter 23.
Read the book for the first part, and all the programming-related chapters in Part Three. When it's good, it's really good. The rest is beyond my current capabilities.
I didn't much like Category Theory in college and I was hoping this book would be able to change my opinion. Unfortunately, it didn't quite work. I did think it was well written and illustrated, but I just don't dig category theory, though I'm not sure why. I would like to think I have some good reason for it, but it's probably just that I'm not quite smart enough to really understand it.
I didn't complete the entire book (read until applicatives and Monads), used the book in conjunction with Bartosz video series on youtube and found it very useful to understand the theory behind.
This is an ambitious book that dares to tackle concepts usually reserved for graduate Algebra courses and makes them presentable for those with a functional programming background. It succeeds in this goal and also in providing a motivating argument on why the reader should invest in understanding this particular mathematical body of knowledge. The examples motivate the reader to explore and stretch their thinking by showing concepts from functional programming folklore expressed in a pure mathematical framework. This mapping from math to programming is bidirectional and this is made salient and even enjoyable the text. This is a math text but instead of the traditional theorem-proof theorem-proof format, it takes on the form of a series of functional programming blog posts (which were the original source content of this text). This blog-style format does work overall however, I found myself wanting more proof details for the more sophisticated topics at the end.
Overall, this book provided me the missing intuition I needed to broach the subject of category theory. In hindsight, I would directly pick up this book before trying to read Mac Lane, Awodey, Spivak, or others. However, I would follow this text with a more rigorous presentation of the subject.
I strongly wanted to like this book more. The preface is compelling to any programmer or mathematician: a firm grounding in good abstractions are certainly a path to better thinking patterns in programming, and should be seriously pursued.
The troubles with CTFP start almost immediately. The definitions are loose and scattered. Statements of importance are relatively buried in-between code snippets and paragraphs. Mathematician’s gripe, nothing is ever rigorously shown, and therefore the importance of certain results is difficult to weigh.
All this is to say, you won’t learn category theory by reading CTFP. You will however, begin to develop some intuitions about what Category theory is about, in the first section of 10 chapters. They will be often somewhat hard to follow, and unnecessarily so, but this is why I might recommend relying on CTFP less for its presentation of Category Theory, and more for it’s synthesis of CT concepts in Haskell. I might rename the book thusly,
Category Theory Haskell Snippets with amiable but frustrating stabs at motivation
Going to read Riehl’s CT in Context next. Have heard nice things.
I managed to read the entire book with friends in a local bookclub. I really appreciated its contents. Since my academic background is in Computer Science, I found this book very helpful in understand advanced functional programming topics as functors, monoid and monads. Personally I found final chapters of part three (e.g.: ends and coends, Lawvere theories, Kan extensions) too abstract and overwhelming.
Eventually, my advice here is to approach this book by interleaving the reading with the YouTube series of the author about the same topic. Those video lectures helped me a lot to grasp the topic of the book even better.
I tried many times to delve into Category theory on the internet, but I gave up pretty soon every single time. With this book, the author managed to a) present category theory as a Mathematical branch b) carry that over to the reader/programmer c) tell them how and why it matters to apply it when architecting the structure of the code.
It is altogether informative and useful.
I'm half way through, and I'm happy I bought a physical copy, because it motivates me more to read it and it's pleasant to detach from the screen once in a while and still thinking about the code I wrote or that I will write. It contains a rich collection of exercises, and the examples being in C++ and Haskell help both the OO programmer and the more functional-oriented programmer. Really suggested as a reference too, being quite complete as assortment of topics.
It contains also challenges in every chapter, most of them short but entertaining, and I have to say in the end useful too.
* Последние 100 страниц пролистал без всякого понимания, потому что там чего-то совсем сложно всё. * В целом, почитать про теорию категорий забавно, особенно когда концепции начинают друг на друга наслаиваться, но практической пользы примерно никакой. * При этом книжка реально требует много думать. Где-то начиная с середины я ещё смотрел видеолекции от автора, но вот к 400 странице перестало хватать даже их. То есть времени нужно вкладывать много (несколько месяцев у меня ушло) и, мне кажется, это же время можно потратить на что-то с большей привязкой к реальному миру. * О потраченном времени, скорее, не жалею, но углубляться в эту тему совсем неинтересно.
The heavy amount of theory made me abandon this 4 chapters in.
I think the book could've done better by focusing on real life software composition problems and how the theory ties into it, rather than just using code to demonstrate the theory.
Without exaggeration this book changed the way I think about programming. To be clear, it didn't change much about the way I code and unfortunately I won't use much of it at work, but it definitely shifted my view on aspects like types (in general and some specific like Void or ()) or algebraic data types. The knowledge is ordered very well and the book is full of examples.
Even though 50% of the content went over my head and 30% was straddling the "not sure if I understood/I think I did" line, this was a good read. For me, having more practical examples would have likely helped, but I do understand that this is a book that's supposed to be heavy on theory.
Anyone into functional programming must read this book. A good supplemental material would be Bartosz Milewski's Category theory for Programmers playlist on YouTube. The abstraction of ideas and the way Bartosz presents the philosophies is amazing. Also, the illustrations are spot on!
This book has a great approach to explaining Category Theory with examples in Haskell and C++, and probably there's no better way for having a grasp of monads.
It's a great book. My coding skills have significantly improved after reading it. However, I found some parts difficult to understand, especially as a hobbyist coder rather than a professional