~/talk

Railway Oriented Programming - A Functional Approach to Error Handling

TalkinFrenchat ScalaIO 2019 · 2019-10-29..10-31· [machine-learning]
links:none on file
slides:none on file

Advocates using a dedicated Result/Either type (and functional tools like flatMap/map/pure, Monad Transformers from cats/scalaz, Applicatives, and Futures) to make error flow explicit at compile time instead of ad hoc try/if checks. Demonstrates an update-user controller that composes validations, a DB update and an email send into a readable pipeline and shows how Applicatives can accumulate errors to catch many missed checks.

AI-written summary · about

  1. 0:00Start
  2. 1:25Motivation
  3. 2:55The Optimistic Approach
  4. 4:21The Realistic Approach + More Code
  5. 5:50Functional Approach (2/2)
  6. 8:11Railway Oriented Programming
  7. 9:40Switch Functions
  8. 10:29Composition? (1/2)
  9. 11:05FlatMap (1/2)
  10. 12:14Flat Map Example (2/2)
  11. 13:28Single Track
  12. 15:10Dead End
  13. 16:34Exceptions (2/2)
  14. 18:31Putting It All Together (1/3)
  15. 24:51I Need to Combine N Objects
  16. 26:49Using Cats Apply
  17. 29:01Monad transformers (1/2)
~/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.