Skip to content
0:00 / 0:00

#dotty#scala3#uniontypes

Functional Scala - Adventures in Type-safe Error Handling by Jacob Wang

Scala in the City

2K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Jacob Wang

Advanced. Deep dive for people who know the field.

1K views6 years ago1 recommendation

Programming languagesSoftware designScalaFunctional programmingLanguage design and type systems

Jacob Wang discusses type-safe error handling in Scala, exploring union types in Dotty for fine-grained error tracking.

This talk was given by Jacob Wang at the Functional Scala conference held at The National Gallery and hosted by John De Goes on the 12th and 13th of December.

Why it's here

1 person recommends this

What people say. Recommended for its exploration of using union types in Dotty to achieve fine-grained error tracking.

u/MyFuncin r/scala • Recommends

Error handling with union types in Dotty After watching Functional Scala - Adventures in Type-safe Error Handling by Jacob Wang and reading Introducing error reporting in optics, I was interested in exploring the use of union types in Dotty for error handling. By defining a type similar to `Either` but with `flatMap` returning the union of the two error types, it is possible to gain fine-grain tracking of errors. This is similar to hotpotato which uses Shapeless's coproduct for the error type. Code together with more information in the readme can be found here- https://github.com/Michaelt293/union-dotty