4 ms·
Very interesting. Though I do wish he would have gone in depth about that duplicated code that he talked so much about. I've been programming Scala profession
by scottious 11y ago
Very interesting. Though I do wish he would have gone in depth about that duplicated code that he talked so much about.
I've been programming Scala professionally for a year now, in a very Functional way because of pressure from senior engineers. So I use flatMaps and for comprehensions all the time and I get that it's simpler than alternative ways to write it but I still don't really understand the core of what a monad really is.
I feel like I use monads all the time and I even have a know what people mean when they use them in a sentence. For example, when referring to a 'for comprehension' in Scala: "Well, what monad are you in?". I get it... I basically interpret that as "All statements in the for comprehension must return a Try or Future" or any other monad, but those are the ones I use a lot. I get that it's basically a flatMat? I guess I haven't actually manually converted for comprehensions to flatMaps, I just use whichever one seems to solve the problem the cleanest way at the time.
So I feel like I get it, kinda. But I'm still not like "monads! wow, so cool!" To me it's more like, "Okay, that's how you write that in Scala".