
Another round of virtual London Scala Talks takes place on Tuesday, June 16th at 6:30 p.m. BST. 47 Degrees Senior Software Engineer Chris Birchall will talk about the new Type class derivation feature in Scala 3.
Type class derivation in Scala 3
Type class derivation is one of the most exciting new features of Scala 3. In this talk I’ll explain how library authors can use it to make life easier for their users.
I’ll start with a quick recap of how type class derivation is typically achieved in Scala 2, and how it looks in other languages such as Haskell and Rust.
Then I’ll live-code a derived
method for the world’s simplest type class, Show. Once we’ve seen how all the pieces fit together, we can move on to a more interesting example: deriving Functor for paramterized ADTs.
Finally I’ll demonstrate how I’m planning to combine type class derivation with Scala 3’s new macro framework to allow automatic gRPC server and client generation in Mu, a microservices framework developed by 47 Degrees.
Join the London Scala users’ group to access this free event.