We'll explore type classes in Scala 3, using its new rules for givens, extension methods, and mechanisms for automatic derivation via mirrors or macros.

Type classes are a Scala superpower, and yet are underused in application code. Compared with OOP-based designs, type classes unlock “parametricity”, meaning polymorphic functions whose type signatures describe their behavior, making code more expressive, safer, and more predictable. This matters even more in the age of AI agents, because more mistakes can be caught at compile time, shortening the feedback loop and speeding up convergence toward a working solution.
We'll explore type classes in Scala 3, using its new rules for givens, extension methods, and mechanisms for automatic derivation via mirrors or macros.
In this talk, I will present insights from running the Open Community Build, where we continuously build and migrate nearly 2,000 open-source projects to the newest Scala Next versions, from scratch, every week.