5 ms·
Learning Haskell through category theory
- raju 18y agoConsidering I am knee deep in Haskell right now, can anyone here tell me why Category theory is necessary to learn Haskell, and furthermore, a text that they know of? (No offense to the other, but that was a lot of books he listed. I am looking for a starting point) Edit - I meant to say "No offense to the author
- arockwell 18y agoMy understanding is that a lot of the concepts and terminology of Haskell are rooted in category theory (e.g., monad, functor, etc.). I don't think its necessary to learn category theory, but it might help if you're mathematically inclined.
- likpok 18y agoUnderstanding category theory would help you understand at a deeper level the idea of a monad, et al. Haskell uses a small subset of the math, IIRC. This is more for mathy people who want to see where it comes from. I'm not sure it would actually be helpful in understanding (as Haskell is a few notches down the abstraction post than categories). EDIT: Furthermore, it might require a heftier background in abstract algebra than most people have/want.
- rkowalick 18y agoPretty much everything is below category theory in terms of abstraction.
- davidmathers 18y agoThe first book on his list, Conceptual Mathematics, is the the way to go. Most intros assume you are a math student and are already familiar with abstract algebra. It's available on google books: http://books.google.com/books?id=o1tHw4W5MZQC&printsec=frontcover http://books.google.com/books?id=o1tHw4W5MZQC&printsec=f... It's also written by the guy who was a driving force in the development of category theory. More so than even its creators, who laughed at him when as a student he first told them his idea of it being a foundation for all mathematics.
- raju 18y agoThanks! Will certainly read some of it online, and then maybe head out to the bookstore. I have always wondered if learning the Math behind languages like Haskell will help me understand Haskell (and FP) better, and part of my resolution this year has been to "go back to the basics". I am certainly looking forward to having this book on my reading list.