~/talk

IO monad & Error management: From Exceptions to Cats MTL

Talkat Typelevel Summit 2020 · on Thursday, 2020-03-12· [functional-programming]
links:none on file
slides:none on file

Advocates replacing business exceptions with domain ADTs and keeping throwables for fatal technical failures, then encoding business failure as an Either inside IO and composing via EitherT so programs short circuit and still run as IO. Demonstrates monad transformers let small programs compose into one for-comprehension, and shows Cats MTL (typeclass abstractions + instances for transformers) removes much boilerplate and inference pain. Example code compiles and runs; caveats: transformer overhead and harder type inference motivate limiting exposure and using Cats MTL for nested stacks.

AI-written summary · about

  1. 0:00Intro
  2. 3:33Why do we need 10 anyway?
  3. 5:38When things go wrong
  4. 6:32Use case: Modeling an authentication flow
  5. 9:57The issues with Exception
  6. 12:36This is a lie
  7. 13:53Domain errors are not exceptions
  8. 16:44Modeling errors using an ADT
  9. 23:05Rewriting our authentication method
  10. 25:43Look how far we've come!
  11. 27:37Challenges yet to address
  12. 28:46Can you guess what this code does ?
  13. 30:36The idea of Cats MTL
  14. 31:51How would one encode the effect of raising errors
  15. 32:40What about recovering ?
  16. 33:15We still get a dedicate channel for technical failures
  17. 34:16Implementing the authenticate method
  18. 35:47Interpreting the program
~/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.