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

I call mega-exponential-factorial-to-the-n-bullshit. I tried doing exactly that. You can't learn Haskell beyond superficial hello world apps without learning what a monad or functor are, because there aren't any substantial teaching materials that don't force you to understand it in order to continue learning, and all the common libraries require you to know how to use them because they are undocumented and have no examples.

Can you use Haskell without understanding how those things work? Sure...if by "use" you mean you are limited to copied and pasted code snippets without an ability to understand what your code is doing, with the slightest change causing unintelligible compile errors.



My impression of the article was not that you don't need to know what monads and functors are, but rather that you don't need to understand them on the level of category theory. I think that's a true statement, if your interest is in simply writing software in Haskell and not in breaking new ground in the Haskell community (like writing the lens library itself).


There's a significant difference between a wide understanding of category theory in general and understanding what a monad or a functor is used for in haskell. They're just type classes, nothing special. There's not all that much more to know about them besides their definition.

I rather disagree that they are undocumented and have no examples. Section 6.3.6 in the haskell report 2010 defines the type class and provides examples: http://www.haskell.org/onlinereport/haskell2010/haskellch6.h...

See also, the typeclassopedia, which walks through a simple definition, many examples, and discusses general intuition: http://www.haskell.org/haskellwiki/Typeclassopedia#Monad

Perhaps I've misunderstood you, and maybe you mean that common libraries are undocumented and have no examples? That certainly hasn't been my experience; most libraries I've run into have plenty of documentation for me. Can you give me some examples?

Yes, I agree that trying to write haskell without being able to understand simple type classes would be very difficult and confusing, but I disagree with what I understand the implied point to be, perhaps you could clarify this for me? I understand you to be saying here that you expect to be able to proficiently use a language with negligible understanding of how data types work in the language, or the common data types defined in the standard library? That sounds like nonsense to me, so I suspect I'm confused here; can you be a bit more explicit in your criticisms here?


You have to learn what Monad and Functor are, but you do not by any means need to learn what a monad is, or what a functor is. To put it another way, you need to learn the Haskell type classes that have those names, but you do not need to learn the category theoretical constructs from which those names were taken. I believe this was the entire point of the article. The Haskell type classes are actually not too hard to learn at all, if you give it a bit of effort.




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

Search: