Hacker News new | past | comments | ask | show | jobs | submit login

Certainly monads, semigroups, etc etc aren’t the silver bullet a lot of people think they are. But it is amazing how many forms of computation can be formalized into these structures. Of course, just because you can doesn’t mean you should. A lot of times it just makes things more complicated for no benefit (a lot of IO monads fall into this category I think).

But there is a big benefit to using these category structure: you don’t have to think as hard about the underlying implementation because you know it must obey certain laws. Also category theory interfaces tend to be pretty simple and easy to learn: most of are defined by a couple functions and a couple laws.

Everyone knows how to map or flatMap, and that’s really all you need in a lot of code!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: