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

I honestly don't get how people can claim that Haskell is unusually hard to learn. I started learning Haskell with zero functional programming experience, and after getting over that initial pure+functional learning curve (which took two or three weeks of casual learning), it was smooth sailing. Haskell is actually a very simple language compared to popular languages like python or C++; you just have to do a bit of thinking to get out of the procedural/imperative/impure mindset.

I especially don't understand how people get tripped up by laziness. 99.9% of strict code will work with no changes in a lazy environment. The rest usually just needs a slight tweak to avoid memory leaks.

To anyone considering undertaking the modest effort required to learn Haskell, I completely recommend it. My code in every language has tangibly improved.



Keep in mind that writing something like this is not actually going to be perceived as helpful to most people who may have difficulty with Haskell. Consider a couple of possibilities.

First, you may be unusually quick, gifted, clever -- whatever you might want to call it. In this case, the new concepts in functional programming might come easy for you. That's great, but to people for whom they don't come so easily, this could easily be considered discouraging, or else bragging.

Second, consider that maybe you haven't advanced as far in learning Haskell as you think you have. In my estimation Haskell can take you up an abstraction ramp, that has no clear and obvious "end." As a research language, higher up that curve is some really mind-blowing stuff. So unless you're SPJ or beyond, I wouldn't be quick to claim that Haskell isn't "unusually hard to learn."

Third, you may be a stage in your life where you can put a lot of free time into learning, but recognize that not everyone is there. In my twenties, I worked much more than full time, and in my spare time worked on yet more programming, teaching myself other languages and environments. Really in retrospect it's fortunate I didn't damage my physical or mental health more than I did. But not everyone is in that boat now. In particular people who are older and have "work/life balance," who are professionals in some form of software development, may find that their employment doesn't offer them much in the way of opportunities to learn another language, and the life part of that work/life balance doesn't allow much time to do so.

Me, I'm somewhere partway up that ramp and proud of how far I've come (I feel like I can use at least simple monads now) but still very aware that there is a lot I don't fully grok (currently trying to get my mind around arrows). And I agree, I completely recommend it, but just maybe don't be so glib to claim it is not hard.


Regarding your first point, it doesn't even require the claimant to be better in any particular sense - it could be that their prior knowledge was simply a better fit to the new concepts.

Regarding the second, I don't think it makes sense to consider "difficulty in learning Haskell" to be "difficulty in learning all of everything anyone's done with Haskell." Even SPJ has (or at least recently had) a pretty shallow understanding of Kmett's lens library. The two important questions are 1) how much do I need to learn to get things done in Haskell, and 2) how much do I need to learn to participate usefully in the Haskell community. 1 is less than 2, which is less than what you described.

"There is more stuff to learn that can make you even more productive, but you can get by without it and still be productive" often gets treated as a negative, and I find that strange...


Learning Haskell is not out of the question for most devs. The real question is whether they're willing to let go of a lot of their programming experience so as to admit a different style of programming.

It's more akin to studying than anything else. I've had evenings where I've been unable to proceed because I can't write one line. It's OK; it's part of learning. No one said it would be easy.

Beginner's mind is key.


>Keep in mind that writing something like this is not actually going to be perceived as helpful to most people who may have difficulty with Haskell

No, but hopefully it well help people who have yet to learn Haskell that not everyone thinks it's particularly difficult. I'm not interested in convincing the people who've tried and given up on it.

>That's great, but to people for whom they don't come so easily, this could easily be considered discouraging, or else bragging.

So what do you propose? That I pretend it's really hard for me, even though it's not? What effect do you think that's going to have?

>So unless you're SPJ or beyond, I wouldn't be quick to claim that Haskell isn't "unusually hard to learn."

You don't have to be SPJ to learn Haskell (or talk about how hard it is). Do I have to be Stroustrup to pass judgement on how hard it is to learn C++?

>In particular people who are older and have "work/life balance," ... and the life part of that work/life balance doesn't allow much time to do so.

I obviously don't mean that Haskell is easy for every single person in the world to learn; I mean that, as far as languages go, it's relatively easy enough to learn. If I didn't have enough time to learn Haskell, I also wouldn't have enough time to learn C++ or Python.

> but just maybe don't be so glib to claim it is not hard.

Again, what do you propose? Lie and tell people that it's super hard, so I don't hurt their feelings if they can't figure it out?


So what do you propose? That I pretend it's really hard for me, even though it's not? What effect do you think that's going to have?

Again, what do you propose? Lie and tell people that it's super hard, so I don't hurt their feelings if they can't figure it out?

I don't anybody is suggesting lying about your own personal experience with Haskell. Rather your posts state that it was easy for you and that it should be relatively easy for everyone.

I think that when programmers from other languages are having trouble figuring out how to write a particular program in Haskell, whether it be due to documentation, the behavior of the code execution, or even language syntax, it doesn't make sense to claim that it should be relatively easy for them.

In my (limited) experience with Haskell, there can be hang-ups that someone with experience in strictly-evaluated languages isn't expecting. [1]

[1] https://wiki.haskell.org/Iteratee_I/O#The_problem_with_lazy_...


Maybe consider a little humility first.


Does it demonstrate a lack of humility to be honest about how difficult something was for me? I'm sorry my truthful assessment offends you. If humility means pretending things are harder than they are, then I guess I don't have any humility.


Whether we find it offensive or not isn't relevant. Your comments are degrading to those who find it difficult, and you are actively hostile when they complain or we point this out.

Your attitude is one I see too often in the FP community, and well-meaning or not it holds us all back.


>Your comments are degrading to those who find it difficult

Again, what do you propose I do about it? Should I never say anything positive about anything, lest I offend someone who had a bad experience?

>Your attitude is one I see too often in the FP community

Which attitude is that? Optimism?


> Should I never say anything

Well if you can't understand why your phrasing turns a positive idea into making somebody feel bad, probably.

> Which attitude is that? Optimism?

A version of it, yes. The "if you don't find it easy you are the problem" attitude.


You seem kind of hooked up on the "easy for you" part, which really isn't the part anyone cares about. I can't even comprehend how you came to the conclusion that you are being asked to lie.

Maybe a more constructive (humble?) approach would be to show others why it was easy for you, subjective as that may be, and how they can achieve faster comprehension levels based on your own experiences.


I'd like to see examples that start with a Java or JavaScript program, then try to translate them to Haskell and documents the thought-process of figuring out how the Haskell solution is and needs to be different.

Haskell aims to be a terse language, right? That's one reason that makes it difficult to "read" it and if you can't read it it's hard to learn it.

Think about learning to read and write Chinese when all you know is English. The only way to do it is to have a text-book that shows you sentences in both English and Chinese. I don't think it is necessarily "difficult" to learn Chinese, but you need learning materials targeted to an English-speaker.


That's exactly why most FP articles and tutorials around the net didn't help me, but Dan Grossman's "programming languages" coursera course did.

If (when) I ever learn enough to talk about why OCaml is better in detail, it will be with concrete examples not buzzword bingo :)


The language itself is not very big. The category-theory based abstractions built on top of it, on the other hand... Just look at the lens library.


That's fair. But I don't think it's reasonable to lump learning about lenses (or other abstractions that aren't part of the prelude) into learning Haskell.


Judging the ecosystem is fair in the same way that Java is lumped together with the reams of j2ee, spring, AbstractFactoryFactory sort of libraries that it yields.

For better or worse, switching to Haskell does entail asking yourself how hard it'll be for your team to become comfortable with things like http://learnyouahaskell.com/functors-applicative-functors-an...


That's a good point. I suppose people do judge Java by the popular Java libraries and their styles. However, I don't really consider those things when talking about how difficult Java is to learn.

Learning Haskell may well be easier than using it, although the same is true for most languages.


But you don't learn Java just to learn Java, usually. You learn it in order to solve a problem. Which means working with the ecosystem. And personally, I'd rather use libraries I can understand if needed.


Except that lens is being used by a quickly growing chunk of the ecosystem:

http://packdeps.haskellers.com/reverse/lens

(Yes, I am guilty too, but I inherited the dependency via Chart ;).)


From your website, you appear to be a college student. Perhaps your expectations and uses are different than commercial developers.


College students often feel at the time that they are completely overloaded with work and barely getting through (in some cases that is true, especially students who are working or non-traditional). But looking back, it is pretty clear that although I worked hard in school, I could have worked so much harder, and also that never in my life again will I be in an environment that was so _supportive_ of just learning. Not just in classes; in fact, my college experience was _especially_ supportive things learned outside of classes. And also, at 20, 21, 22 -- there are very good reasons those are the traditional college years. Our brains are just able to _soak_ up ideas so quickly at that age. They aren't wise, they can't necessarily integrate everything, but we are _sharp_ then! (Usually...)


I am also a commercial developer; I work full-time during the summer to pay for college. My expectations don't really change much. Of course, everyone has different expectations.


That's a pretty sad indictment of commercial developers. Or perhaps just the pressures put on said developers :/.




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

Search: