Typesafe & Total; Elegant & Expressive; Compositional & Correct: Exceptions are back!
Correct software must handle every deviation from its happy path. Functional programming provides exactly the safety guarantees we need to build it.But it comes with a heavy syntactic burden: try telling an Java programmer they must use `map`, `bind` or `traverse`, when all their experience is of first-class member selection, function application and thrown exceptions. Is it any wonder FP is such a hard sell when even JavaScript expressions compose better than monads?Now try convincing a functional programmer they no longer need to encode failure in monads, when years of successful use has made them second nature.Nevertheless, this is what I shall attempt.Soundness, a new ecosystem of libraries for Scala 3, offers an uncompromising alternative: the expressiveness and compositionality of direct-style Scala with incrementally-checked exceptions, and without the slightest compromise on safety.I'll show you how to write code that's as readable as Python and as safe as Haskell; where the transition from prototype to production is a seamless continuum of gradual enhancement towards totality. I'll show how Scala 3's context functions are the perfect mechanism for encoding partiality, how they make exceptions safe again, and how this can lead to a new utopia of safety and elegance.