Scala Monads: Declutter Your Code With Monadic Design

preview_player
Показать описание
In this video tutorial, Dan Rosen will show you how to use Scala's capacity for monadic design to eliminate repetitive boilerplate in your code. You'll learn to recognize places where the perpetual clutter of null checks, try-catch blocks and more can be hidden within a monad, to make your code's logic stand out clearly.

Рекомендации по теме
Комментарии
Автор

Excellent. This is the most practical explanation of a Monad I've seen.

MichelCarroll
Автор

After around 10 videos I finally found an explanation on WHY monads are useful (and not how they are constructed. Thanks for putting a capital P on Practical Lesson!

LucianoBargmann
Автор

This is the best introduction I've seen around! Thank you so much 💜💜💜

SebastianGeorgi
Автор

This video is more concise and clear than the damn Red Book (Functional Programming in Scala) ughghghghghghhhh

mnfchen
Автор

Thanks Dan, great tutorial on Monads. Finally it makes sense to me, since I have been struggling the last couple of days and most examples getting to fast to abstract and/or being to mathematical. Great real life examples. Keep rocking.

weissmannrob
Автор

I don't know Scala (yet), I don't know scalaz lib (yet), but still I could learn a lot from the code you represent to implement Monad's in other languages. Thank you very much!
Lastly I think that Scala is the best path for Java programmer that wish to learn FP paradigm.

budokan
Автор

I might have to watch this video 3 to 4 times to get hold of it completely!
but i think i still have some hope in learning scala!

vbnandu
Автор

Great description of a monad to help those from a OOP background!

sbditto
Автор

Very nice explanation of a confusing topic. Thank you.

shyamtopradeep
Автор

"I call it my billion-dollar mistake. It was the invention of the null reference in 1965.
"
-- Tony Hoare

epiphoney
Автор

This is a good presentation on how to use Scala's monadic comprehensions to clean up code.

The problem you might want to address is that the performance characteristics of for comprehensions can be very, very *very* unpredictable. As such, it's taboo in many libs where performance is considered important. An alternative notation might avoid this.

KirinDave
Автор

I find this very useful coming from java! Thx a lot!

PadelForPadel
Автор

I used to think the same thing but then realized that Scala, at the core, is in fact a rather simple language that allows you to express complex ideas. You could create monads in plain Java if you so wished, but it'd be even more complex and verbose.

anagram
Автор

Nice way to break down monads and for-comprehensions and how they interact, I have a much better understanding to apply these concepts generally. A question: what if I want to preserve the original exception all the way up to identify the root cause, and handle each one differently, but still want to recognize error handling as a cross-cutting concern?

reedsandberg
Автор

Yes, great explanation, it all makes sense now ! : )

krisrudecki
Автор

What should be returned if you ask the first element from an empty list? An empty list? Null? What if the first item in the list was one of those? An exception? The Option monad described at 05:50 is similar to the Maybe monad in Haskell, which is very often used: what to return when you ask the index of a non-existing item in a list? -1 or null are possible, but it's simply much more clear if you say that the function "maybe returns an int".

apella
Автор

What's the music in the intro and outro of this video? It's really nice.

nnuggit
Автор

If you used a slightly smaller typeface, you could make it possible to see more of the blank white background.

mackler
Автор

I would have loved you if you used smoke-white color against the white background

MercedeX
Автор

I'm currently wrapping my head around Scala.  Nice video.  However, the way I see it - it may more readable but you're actually writing more code by creating the extra monadic types.  Am I missing something or is this a tradeoff that a developer has to consider?

dlmartin
visit shbcf.ru