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

Honestly, it seems to me like if you don't understand category theory and type theory well, using Haskell will be either hard or impossible. That's what people who are into Haskell are into, and they seem to be a relatively rare breed. (I have a lot of trouble understanding these subjects, though I continue to try. I still don't know what the hell a monad really is.)



Do you want to know "what a monad is" in math or Haskell?

In programming, a monad is a particular design pattern, which is exposed in a particular interface (appropriately called Monad) in Haskell. The design pattern supports a certain way of combining things. The fact that so many disparate things support this interface (State, IO, Software Transactional Memory, Readers, Writers, Continuations...) means that all of the code we write that generically talks to that interface can talk about any of those things, and that's pretty powerful. The fact that one of those things is, in a certain sense, voodoo (IO) shouldn't lead you to think they all are - Monad is just an interface for combining things according to certain patterns.


>if you don't understand category theory and type theory well, using Haskell will be either hard or impossible

Absolutely not true. I never completed a single credit of university and struggled with high school math. I don't know any type theory or category theory.

Not only am I comfortable in Haskell, I teach Haskell.

Here's my guide for learning Haskell: https://gist.github.com/bitemyapp/8739525


I couldn't really tell you anything about category theory. But I am beginning to grasp monads. (At least in the context of Haskell programs.)

I think the important thing is to see how they work, see what they do.

btw, you might try this video: https://www.youtube.com/watch?v=o6L6XeNdd_k


Just throwing my voice into the chorus, I know nothing about category theory either, and I don't think that hinders learning Haskell.

I do think there is a subset of Haskellers who use category theory to prove certain ideas and they are able to easily express that in code. However I haven't found it necessary to understand the theory behind why something is sound in order to practically use their work in my projects. That says more about Haskell's expressiveness than the target audience to me.

Setting aside years of imperative (and also OO) programming and learning a different approach to solving problems has been the biggest challenge for me, by far. That's why I agree wholeheartedly with https://news.ycombinator.com/item?id=7687200




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

Search: