Abstract

Scala 3 provides a metaprogramming interface that represents the abstract syntax tree definitions using algebraic data types. To allow the compiler to freely evolve without breaking the metaprogramming interface, we present virtual algebraic data types (or Virtual ADTs) - a programming pattern, which allows programmers to describe mutually recursive hierarchies of types without coupling to a particular runtime representation.

Details