~/talk

Getting started with EitherT

Talkat Scale By The Bay 2018 · 2018-11-15..11-17· [scala, functional-programming]
links:none on file
slides:none on file

Claims that wrapping Future[Either[E,A]] with EitherT[Future, E, A] (from Cats/Scalaz) makes code readable by avoiding double-unwrapping and enables fast-fail error composition. Shows converting exception-returning DB futures into Either at the boundary, defines an InternalError/ProcessingError hierarchy, and demonstrates leftMap/ensure/fold to remap errors, validate values, and collapse to a single Future result. Examples include name validation, chaining checks across asynchronous calls, and keeping exceptions out of core logic.

AI-written summary · about

  1. 0:00Introduction
  2. 0:58Understanding Either
  3. 2:44Right bias in Either
  4. 4:10Chaining Either operations
  5. 5:34Either for error handling
  6. 7:38Combining Future and Either
  7. 9:25Introducing EitherT
  8. 11:14Error hierarchy with EitherT
  9. 12:22Converting exceptions to Either
  10. 13:25Left-side mapping with EitherT
  11. 14:07Validating values in EitherT
  12. 14:50Folding EitherT results
  13. 15:32Other monad transformers
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.