News for hackers. Stuff that matters.
Re:Why study functional programming? (2012) by goostavos on Tuesday August 02, 2022 @05:03PM (#32324282)
Monads are indeed way simpler. Just a few beautiful laws. The problem is that they take a loooooooooooong time to really internalize. Saying it takes "5 minutes" is empty in the same way that "learn C++ in 24 hours" claims are (or you're hella smart!).

There's a quote that floats around that's like "as soon as you understand monads, you lose the ability to explain monads." It takes a ton of leg work to make them click. They're simpler, but definitely not easy (in the Rich Hickey sense).

Re:Why study functional programming? (2012) by bitL on Tuesday August 02, 2022 @05:23PM (#32324453)
Ok, so you understood flatmap and therefore monads in 2 minutes. Now you need something that needs nested monads. That's where major complexity suddenly appears - your code is no longer simple and is full of artificial constructs like transformers just to do simple things. Moreover, anyone who reads your code must know all language constructs you are using or they are lost and can't fix any issue in your code.
Re:Why study functional programming? (2012) by solomonb on Tuesday August 02, 2022 @05:50PM (#32324719)
> Moreover, anyone who reads your code must know all language constructs you are using or they are lost and can't fix any issue in your code.

Does this not apply to every language ever?

Re:Why study functional programming? (2012) by peoplefromibiza on Tuesday August 02, 2022 @05:08PM (#32324326)
5 minutes is the time it takes to understand how the pattern works.

Be good at it?

More like a thousand hours.

there is nothing that is really simple, but before being simple, everything looks difficult.

p.s. I love Rich Hickey and especially his keynotes at Clojure conferences.

I've watched simple made easy at least 10 times.