~/talk

TYPE-SAFE ERROR HANDLING IN THE AGE OF DOTTY

Talkat Scalar 2020 · on Friday, 2020-05-15· [scala]
links:none on file
slides:none on file

Claim: using Dotty union types on the left side of Either lets methods declare exact, unrelated error sets (e.g. NoPotatoes | BurntFries) and preserves exhaustive checking at compile time while erasing to a common supertype at runtime. Implementation detail: Either needs a left-type hint but EitherT flatMap tweak or introducing an ErrorMonad/ErrorApplicative typeclass (F with two type args) makes inference work across transformers. Prototype compiles under Dotty, supports validations, and keeps runtime performance unchanged.

AI-written summary · about

  1. 0:00Start
  2. 2:14Combining error types is messy
  3. 4:25Combining error types using an ADT
  4. 6:24Java Checked Exceptions
  5. 11:52Errors as union types
  6. 12:36Error unions vs checked exceptions Compare
  7. 13:07Handling errors
  8. 14:54What about type inference?
  9. 18:07Error Monad type class Represents dependent composition with errors
  10. 19:21Validations
  11. 19:55Error type classes hierarchy
  12. 20:58Type classes in Dotty with extension methods
  13. 22:36Our prototype for Error Monad
  14. 22:59Conclusion
~/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.