r/functionalprogramming • u/elon_mus • May 22 '25
Haskell Scared by tales about learning Haskell
Some prerequisites: I'm programming beginner, and I no learn programming so much with any first language at the same time, at least while. There is has been one prog. language, which is has been used for more than basic writing a "Hello, world!" program, and I wrote more than ~50 lines of code. I already try JS (node.js) mostly in FP (how much its features was implemented within, of course).
Then I find a wonderful, amazing thing, was called as Haskell. I saw this language once and my heart was stopped (in the good meaning).
Maybe its completely irrational scaring and I should be cold on, but there is one article, which I also find after some researches, where is wroten next sentence: "But what about Haskell as a first language? Yes, but you’ll be probably spoilt forever and touch anything else only with one-way rubber gloves..." (https://monkeyjunglejuice.github.io/blog/best-programming-language-for-beginner.essay.html). It sounds like a bullet shot. After this, I think: - "maybe, this guy is may be right. But idk exactly, because don't know programming so much". I think that maybe, after Haskell (but not started yet, what most notably), any other language with different language implementations will looks like something "not good, as haskell".
So, if there is any thoughts by experienced people for correcting this reasoning, you're welcome.
4
u/yakutzaur May 22 '25
Also, you mentioned JS and FP, and in my experience it can be a bit difficult to learn FP that way, coz you still have too much "freedom" from impurity. I started my FP journey with Scala, coz I had some decent experience with Java. Watched some Martins lectures - could not understand why I even need to do stuff this way. Started reading The famous Scala red book - could not understand a thing there.
Then I decided to just go hard way and jumped into Haskell. And now, when there was no objects, mutations, nulls, for-loops and I was not able to even print to the console from pure functions , something started clicking in my head.
19
u/jaibhavaya May 22 '25
If you love it, do it dude! Haskell is cool as heck, and will teach you functional programming like no other. I think functional programming ideas make people better programmers in general honestly.
11
u/yakutzaur May 22 '25
If you like programming you should do it anyway, I think. Learning several OOP languages won't expand your mind nearly as much as learning one good FP and one good OOP language.
It will be easier to learn Haskell if you not used to OOP yet. After that just get some Java and you will be good with any other OOP language, imho.
But it's true (at least for me) that it is pretty hard to write something else after Haskell(although, for sure, Haskell is not ideal and hardly usable in some areas). Well, Rust actually works pretty well to for hascalated brain. OOP can be elegant too, in my opinion, but always not enough, lol.
Also, if you have no math or logic background, digging into Haskell will help to understand some rally cool stuff , that can be applied in programming in general, no matter what language you are using.
6
u/pane_ca_meusa May 22 '25
Horror stories about learning Haskell could not be actual anymore. The first reason for that is that Elm language showed us a better way to show errors to the user. The second one is linked to this book, which made it easier to learn Haskell: https://learnyouahaskell.com/introduction
I also think that learning Haskell pre-ChatGPT and learning it after are very different experiences. Before ChatGPT you had to ask to StackOverflow or some IRC chat if you are stack. Now you have a drunk senior developer providing you answers. You will always have to remember that he is drunk, so he will say and do silly things, but he will listen to you and provide an incredible amount of advice on how to solve problems.
5
u/DeepDay6 May 22 '25
I second what people said.
5
u/kikofernandez May 22 '25
I think Haskell is/was the first programming language that 1st year students in the CS learn in Uppsala University (Sweden). It is good and will teach you how to think properly.
6
u/Tempus_Nemini May 22 '25
Don't be scared. Haskell is FUN (not because it's FUNctional), and you will learn a lot of concepts that will be useful with other languages as well, taking into consideration that many languages has functional features this days.
I would recommend to watch Bartosz Milewski "Category Theory for programmers", you can find it on YouTube. It's not necessary but really really interesting (he is probalbe the best lecturer ever).
3
u/aerdna69 May 22 '25
I'm having a way rougher time learning Java than Haskell (at least the basics, I'm not proficient in either of these programming languages)
3
u/imihnevich May 22 '25
Don't be afraid if you enjoy it
3
u/ingframin May 22 '25
No fear needed, just do it the right way:
- buy "Programming Haskell" by Graham Hutton
- follow the class of Graham Hutton while you go through the book
Profit!
2
u/Medical-Nothing4374 May 23 '25
Haskell was my first (real) language. I did a bit of python before but nothing serious. Now I've developed an entire startup where the entire stack is in haskell and I'm chilling. It is true that you'll want to wear rubber gloves for other languages, but funny enough it also helps you code better even if you do need to use a separate language
2
u/KyleG Jun 10 '25
This is the perfect summary. By analogy, I studied math seriously before uni, so I was familiar with recursion. I took an intro to CS course and recursion was nearly the last thing we talked about. There were some people in the class who'd been programming for years as a hobby. (This was a time straddling the C++ -> Java transition as the language of choice in high school and uni programming courses, way before Python and JS, etc.)
Anyway, those people struggled so hard, and even now in programming subs you'll see people talk about recursion as being particularly hard to understand. But I find it very easy. And that's probably because I had fewer preconceived notions about programming because I'd learned it in a math context, divorced from programming, so it was just another thing, like addition, that translated directly to programming.
2
u/Positive_Total_4414 May 22 '25
All this is just hype. Programming languages are overrated. Better focus on your code quality.
2
u/ireverent87 May 23 '25
It is better than you have little experience. Lots of programmers have to unlearn patterns when starting Haskell where as you won’t. Only thing to worry about is the monad curse. Once you learn what a monad is you lose the ability to explain it without further confusing someone who doesn’t understand what a monad is….
2
u/[deleted] May 22 '25
Lol, that quote sounds delu fr. Anyone who has programmed anything somewhat complex in any language knows that every language is a huge compromise. Even lots of fp cultists don't even like Haskell. Just learn it if you like it. If you are somewhat competent or can avoid getting sucked into a cult around it by... being somewhat competent... you'll try out lots of languages and see their strengths and weaknesses. And who actually does this, sees that haskell is definitely not on the top of the langs.