Scala has a highly expressive type system, but it doesn’t include everything you might find yourself hankering after, at least, not as primitives. In this talk, advanced Scala expert Miles Sabin will show how we can encode union types in Scala, in the course of which I’ll have an opportunity to shed a little light on the Curry-Howard isomorphism and show how it can be put to work for us.
If you've ever wanted to know how to play cool and practically applicable tricks with Scala's type system, then this is the place to be.
YOU MAY ALSO LIKE:
- Shapeless is Dead! Long Live Shapeless! (SkillsCast recorded in December 2017)
- ScalaCon 2021 (Online Conference on 18th - 22nd May 2021)
- An Introduction to Cats Effect with Adam Rosien (SkillsCast recorded in April 2021)
- Abstract Data Types In The Region Of Abysmal Pain, And How To Navigate Them (SkillsCast recorded in September 2019)
Encoding Unboxed Union Types in Scala
Miles has been doing stuff with Scala for more than ten years, currently with Underscore Consulting. He is a cofounder of Typelevel and his best known project, the Scala generic programming library shapeless, is the weapon of choice wherever boilerplate needs to be scrapped or arities abstracted over.