Please log in to watch this conference skillscast.
The Dotty platform comes with a host of new and revised language features that aim to simplify the Scala landscape. In this talk you take a brief look at one such feature: Phantom Types.
Phantom Types have been used in functional programming for many years, but the recent addition to Dotty realises this feature in a novel way through the introduction of dedicated universes. Phantom Types enable data to be modelled with invariants that might otherwise be difficult to capture and do so without incurring any run-time overhead.
In this talk you will learn what a Phantom Type is, what it can be used for (through a real-world example), and how the support for Phantom Types differs between Scala and Dotty.
Joey would also like to to credit his colleague, Gianlorenzo Fagiolo, for his contribution in this talk.
YOU MAY ALSO LIKE:
Lightning Talk - Exploring Phantom Types: Compile-Time Checking of Resource Patterns
Joey is a software developer at OVO Energy using functional programming and Scala to solve problems in the wild. Before that, Joey completed a Ph.D in typed functional programming