by munchler on 6/17/24, 5:19 AM
Cute. All kidding aside, though, functional programming is worth the effort to learn, and it doesn't actually take 15 years. The payoff is at the end of the article:
"It’s quite natural to program in Haskell by building a declarative model of your domain data, writing pure functions over that data, and interacting with the real world at the program’s boundaries. That’s my favorite way to work, Haskell or not."
Haskell can be intimidating, though, so I would recommend F# for most beginners. It supports OOP and doesn't require every single function to be pure, so the learning curve is less intense, but you end up absorbing the same lesson as above.
by usgroup on 6/17/24, 1:24 PM
In my opinion, if you are after the mystical experience of understanding functional programming, you're better off learning Prolog. I think it has more to offer in terms of insight, because wrapping your head around the language only takes a couple days, but wrapping your head around its consequences is a gift which keeps on giving for quite some time.
Immutable functional programming is basically what 80% of your Prolog code will look like. The benefit is that you'll be able to understand how everything works from end-to-end.
by leononame on 6/17/24, 6:10 AM
Great read! Can anyone here recommend a good resource for learning Haskell that's in the style of "Text-Mode Games as First Haskell Projects"? Haskell has been on my radar since forever, and I've got some FP concepts internalized by making a side project in F#, but I have no idea what a monad really is and a fun prohect to code along might be perfect.
by neonate on 6/17/24, 6:25 AM
by stoorafa on 6/17/24, 5:29 AM
Had a lot of fun reading this. I’d love to see some of the author’s code to get a sense what the journey produced, if that’s even possible
by iNic on 6/17/24, 11:07 AM
by TrackerFF on 6/17/24, 6:01 AM
What's the benefit of learning a PURE functional programming language, opposed to just using a language which has adapted the best bits and pieces from the functional programming paradigm?
Given that you want write code that sees "real world" use, and is used to handle data and events from the real world. To me, sometimes the line between optimized code and intellectual curiosity blurs.
by drwu on 6/17/24, 11:01 AM
When Haskell was a hot topic around two decades ago, ML was also quite often discussed. Today ML almost only means machine learning
by LittleOtter on 6/18/24, 2:14 AM
"What fascinated me about Haskell when I was still a teenager? Who knows. I had been coding with increasing enthusiasm since I was 10 or 11 but I was no wunderkind. I certainly hadn’t attained anything like the skill or, more importantly, taste I had after just a few years in the working world. What I like about it today is that it’s quite natural to program in Haskell by building a declarative model of your domain data, writing pure functions over that data, and interacting with the real world at the program’s boundaries. That’s my favorite way to work, Haskell or not."
I adore these sentences.:)When I read it,it feels like I met myself.
by Loxicon on 6/20/24, 2:24 PM
"It’s quite natural to program in Haskell by building a declarative model of your domain data, writing pure functions over that data, and interacting with the real world at the program’s boundaries. That’s my favorite way to work, Haskell or not."
Are there any good resources you can share to learn this specific way of programming?
by revskill on 6/17/24, 5:22 PM
Yes, it's better to spend 15 years to learn Haskell than keep creating messy imperative programs without knowing how to improve.
by lonk on 6/17/24, 6:07 PM
Just "15 years" or Nothing
by tomcam on 6/17/24, 1:57 PM
Sure, lord it over the rest of us peons. We can’t all be overachievers, you know.