Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main reason to learn category theory for Haskell is to learn how much of the Haskell meme complex is wrong. Otherwise, it won't help the typical newcomer. I think it's important to explain that Hask isn't a category, that Haskell's type system is unsound, that Haskell doesn't have sum types, etc.

There are powerful applications of category theory to other parts of computer science. If one keeps in mind that Haskell is Just Another Programming Language, then one can apply category theory more generally and fully.



Agreed. Let me drop some references about the relationship between Haskell and Category Theory that really helped me untangle these concepts, in case it might help others.

[1] Haskell/Category Theory https://en.wikibooks.org/wiki/Haskell/Category_theory#cite_n...

[2] Bauer 2016, "Hask is Not a Category" http://math.andrej.com/2016/08/06/hask-is-not-a-category/

[3] A reddit comment in response to #2, https://www.reddit.com/r/haskell/comments/4wk0gs/hask_is_not...

[4] StackOverflow, "Is Hask even a Category?" https://stackoverflow.com/questions/48485660/is-hask-even-a-...


> Haskell doesn't have sum types

Say what?..


I think it's because `Either a b` contains all of `undefined`, `Left undefined` and `Right undefined`. In other words, a technicality.


And this is not even the bottom of Haskell's unsoundness.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: