It quacks but it’s not a duck structural typing in Scala 3
summary
Explains how Scala 3 combines macros, literal singleton types and compiler rewrites to give compile-time checked structural access: the Selectable trait triggers rewrites for refinements so missing members fail at compile time, the older Dynamic trait does runtime proxies, and a demo Istra library wraps Apache Spark DataFrame API to let columns be accessed as refined members. Shows concrete signatures, macro rewrites, and a working demo that catches typos at compile time while keeping Spark performance.
AI-written summary · about
chapters (9)
- 0:00Introduction and concepts
- 2:07Type system foundations
- 6:32Duck typing in Scala
- 10:48The Dynamic trait
- 16:45Advanced Dynamic usage
- 21:35Refined types
- 26:17The Selectable trait
- 32:49Spark API challenges
- 37:58Istra library and conclusion








