4 ms·
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
by goostavos 4y ago
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).
- peoplefromibiza 4y ago5 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.
- bitL 4y agoOk, 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.
- solomonb 4y ago> 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?