At what point should I give up on learning Haskell?

Thanks @FrancisKing, I found this validating. I guess I feel I have a reasonable grasp on the things you have written about, and you have a really nice way of explaining things. I think the community would really benefit if you stuck your fingers in some of the documentation!

It is encouraging to learn about the similar movements of SimpleHaskell, BoringHaskell, and others noting the problems with Haskell’s ivory-tower culture in workplace/production code. For now, I’ll stick with it and hopefully things will start to click soon!
Cheers for all the responses. To receive so much interest in this topic makes me feel welcomed, and is a promising indication that the language will continue to improve!

3 Likes

My personal feeling is that “The Haskell Book” is too much of a tome to make it worthwhile for newbies*. I think its place is more appropriate as a reference. I bring this up in this discussion because if I were in OP’s shoes, I think I’d be discouraged by being directed to it.

  • I hope I am remembering this example correctly, but the book dedicates an entire chapter to Foldable simply to say Foldable is “to list”, so think about it as a container to which you can do “listy” things to it, including folding.
3 Likes

Sure; I just don’t know of a better resource right now. I’d welcome something that was a bit shorter!

Its tricky; I think those kinds of things help give you practice. they help you get better with working with more abstract ideas. For example, there is the semigroup and monoid chapters; are those strictly necessary? I don’t think so. But, do they help a person grow as a haskeller so they’re ready to tackle functor/applicative/monad? I think so.

At the time, everyone was telling me “this book will get you to the point where you can write real stuff in Haskell”. By the time I finished it, I was more than able to write real world applications in Haskell.

So yeah, it was a giant book. But IMO being confident that something will actually get you to the goal you are trying to hit is extremely motivating.

For me one of the biggest issues with reading is unclear value proposition. What will I get out of the book? If I invest my time in it, will I actually be be able to complete it? If I complete it, will I actually be able to use that knowledge to do what I need to do?

To OP, if you do find the size of HPFFP to be demotivating, perhaps I can recommend https://www.amazon.com/Programming-Haskell-Graham-Hutton/dp/1316626229/ . It is much shorter, and does a good job too. I bought it after having already completed HPFFP however, so its hard to say how accessible it would be to a non-programmer. but, I can say for sure that I randomly read the chapter on parsers and found it mind-blowingly cool. So I bet the rest of it is pretty good. And one of my buddies recommends it too. But he isn’t really an actual haskell programmer now though.

2 Likes

I’m getting out of this struggle right now :smile:

The problem for me was that I read too much about Haskell without settling all those concepts with real work. There are many reasons for this, time is the primary one for sure.

So for anyone dealing with this feeling right now what I decided to do, and seems to be working, is:

  1. Stop reading about Haskell, you already know enough
  2. Write Haskell code, try to implement something small, or look for an open sources project in Haskell and pick one of the “#good-first-issue” issues. Or just try to run it locally and make small changes.
10 Likes

My biggest problem with Haskell right now is not so much the language itself – I love it!!! – but the interface with external libraries, like Dear ImGui, for example. There are inconsistencies with what should be an “Int” and a “Enum” in the typing that stops the compilation cold in its tracks.

I was told that the autogen tool that created the FFI between Haskell and ImGui is, in so many words, a bit janky, and fixing one problem may break others.

I would love to see problems like this resolved faster.

It would also help to see better documentation with the Haskell libraries as well. With examples. And better support for LLVM as well. Better support for ARM architectures would also be a clear win.

Basically, I want to be able to turn to Haskell in all places I normally would have to resort to using C++, Python, Ruby or even (ugh!!!) Rust. Why is not Haskell eating Rust’s lunch? Doing complex data structures in Rust is a real pain, having always to fight with its borrow checker or spraying “unsafe” all over the code. I want to focus on the problem I am trying to solve, not on making the compiler happy!!!

I will not be giving up on Haskell anytime soon, because Haskell allows me to think more mathematically than any other language I’ve used to this point. Not sure of OCaml or even Coq would be better… have not learned either yet, and I hope I don’t have to.

5 Likes

For me, Learn you a Haskell was the right introduction to Haskell. Then, I went over to Rosetta Code and tried implementing some of the tasks in Haskell.

It took me a few years to feel comfortable with Haskell. It’s been about 12 or 13 years now since I first started learning Haskell. I would say I’m pretty good at Haskell now, but I still use only a subset of it. I’ve tried and failed to understand arrows and lenses, so I just don’t use those features in my code, and I don’t use libraries that use those features in their API. I only just started using monad transformers this year.

The good news is that there is a useful subset of Haskell which is fairly small. But learning “the whole language” is something that takes a lifetime. (At least for someone like me, who only has a bachelor’s degree, and isn’t particularly mathematically inclined.)

Just don’t feel like you need to use every feature, because you don’t. Find a subset that works for you, and gradually expand it if you need/want to.

4 Likes

I’ve seen this sentiment many times before. People try to learn Haskell from LYAH and end up really liking the book even though it failed to teach them Haskell. They end up thinking it’s their fault for not understanding Haskell, that they are not smart enough or don’t have enough background knowledge for Haskell, or that Haskell is just too darn complicated.

I’m pretty sure that today there are other introductions to Haskell that would’ve worked better for you.

btw, if you’d like I can try to explain the basics of lenses. Hit me up if you’re interested.

6 Likes

This is very interesting. What’s your impression of the dynamic here? People want to learn Haskell; they see LYAH mentioned somewhere; it has a nice elephant and a friendly tone so they read it; it’s not actually a good beginner Haskell text, but it’s so friendly they blame themselves rather than the book?

2 Likes

That’s my impression at least, yes.

To give another anecdote, here’s an old thread about the experience of some people with LYAH. Even though the commenters are likely to be survivors, there are still some less than positive (detailed) experiences there.

2 Likes

I agree completely, gilmi. I have been surprised over the years at the amount of praise people give LYAH and how often it’s recommended given the number of stellar introductory resources we now have. Yet for some reason I had never considered the book itself playing a role in people dropping out of learning Haskell, but I do think that makes a lot of sense given the issues I believe the book has.

The first few parts of LYAH are good as a day one GHCi-as-a-calculator introduction, but it fails as an introduction to actually using Haskell as a programming language instead of just an expression evaluator, and I think that’s why many people think they just can’t learn the language. Not everyone who feels that way, but many.

5 Likes

I never rely on one book, but many books and other sources. LYAH? I poked around in there for examples, etc. One of the many references that I’ve used.

In my experience, actually doing a solid (not toy) project in a language is the best teacher, and Haskell is no exception.

My only wish is that I could focus on it far more than I have the actual time for. Haskell needs time. The way I look at Haskell is that it’s the German of programming languages. And German needs time too.

7 Likes

This probably isn’t the best advice since it’s very long, but I’ve found the (combined) Haskell WikiBooks book to be pretty good & thorough. I was already somewhat into Haskell when I started though, so it’s probably not that great of a beginner book, although I could see someone learning Haskell through it.

3 Likes

I got super frustrated and quit for about 3 weeks. Something (forget what it was) inspired me to get back to it and I rethought my approach. In short, I accepted, perhaps given my background, that it will take me longer to learn Haskell than it would a language like Python which I have never used but intuitively understand. So now if I use all my available study time for a week (which I have about 10 hrs per week) to thoroughly pick apart and fully understand something, say a code sample, I accept that. My frustration is gone (so far) and I’m retaining more.

I also have a number of books:

  • LYAH - I think left too much unexplained but I do refer to it as an additional source
  • Haskell from First Principles - got part of the way through it and have since been using as a reference and hope to finish it eventually.
  • Get Programming with Haskell - I’m currently following this book and think it is the right level for me. Combined with reading about its topics in other books I’m getting a lot out of it.
  • Haskell in Depth - is a too advanced for me at this point but I struggled through some of the examples in it and that was very helpful. Hopefully will finish in future.
6 Likes

Don’t give up. I struggled a lot too learning Haskell and had several pauses, sometimes as long as a year. But everytime I got back to it my understanding and intuition of the language got a little bit better. A game changer for me was taking a (long) detour and learning Elm. A beautiful language, much simpler than Haskell and helped me build a deeper understanding of the basic functional concepts. After that I got back to again and much of the stuff I had struggled with in Haskell suddenly made sense. :slightly_smiling_face: I highly recommend Elm as a language for learning FP.

4 Likes

One should try finding a mentor before giving up. Or a study group. Or TA, if you’re struggling with course material.

And have some project in mind to hammer at it with the newfound knowledge.

1 Like

I wonder why this thread is still active…

I have been thinking about starting a study group and would be happy to organize. Anyone interested?

3 Likes

I would so be interested!
Could it be arranged at a reasonable hour for Australia? GMT +10h (almost 9pm at the time of this posting).
Certainly isn’t the programmer stereotype, but interacting with other humans (or super-advanced AI bots) definitely helps me learn.

@odcameron I’m based in Perth and always happy to meet people if you (or anyone in a compatible timezone, really) are interested.

@odcameron @andreabedini

I’m in California. Looks like our only overlap is in your morning. Is that a possibility for you?

1 Like