Skip to content

Jon Pretty: Magnolia: Generic Derivation 2.0

Photo of Noel Markham
Hosted By
Noel M.
Jon Pretty: Magnolia: Generic Derivation 2.0

Details

This month we've got Jon taking about his new library. You'll need to sign up in the SkillsMatter page at https://skillsmatter.com/meetups/10359-magnolia-generic-derivation-2-0

----

In the last few years, typeclasses have become an increasingly popular tool for solving a wide variety of problems Scala developers encounter every day. But while typeclasses can be composed in entirely predictable ways from smaller primitive types to support larger abstract datatypes, there's no support offered from the language to do this.

For a while, Shapeless has been an admirable enabler, leveraging implicit search and a couple of macros to provide automatic derivations, but its approach to the problem is the cause of very slow compile times; the definitions needed to derive a typeclass are often verbose, type-heavy and complex; and, when derivation fails, the user gets no debugging feedback.

Magnolia basically fixes all of these problems.

Photo of London Scala User Group group
London Scala User Group
See more events
Skills Matter at CodeNode
10 South Place, London · EC2M 2RB