Typesafe & Total; Elegant & Expressive; Compositional & Correct: Exceptions are back!
summary
Claims a practical Scala 3 library called Soundness lets code return plain success types while encoding precise failure types via context functions and a capability type called raises. It demonstrates macros like recover and combinators mitigate/validate that derive tactics, enable accumulation of validation errors, and integrate with generic derivation. Performance matches monadic approaches when stack traces are disabled, and a known caveat is unsafe capture of tactics across async boundaries pending capture checking.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:36Software golden rules
- 3:50The monadic approach
- 9:11Limitations of monads
- 14:10Context functions
- 22:05Tactics and error raising
- 27:13Mitigation and recovery
- 33:09Derivation and decoding
- 38:12Refined types and validation
- 51:42Final conclusions
related talks
26mThe Freedom of Static Typing
20mBetter Together: Rust & TypeScript
32mTour of language landscape
36mFunctional State Machines in Rust: Typestate and Newtype Patterns
01h 02mOption(al) is not a failure
38mType-level interfaces in Haskell & Rust: pragmatic type-level programming
31mThe Rust That Could Have Been
31mFunctional programming guerilla in the land of Rust
