Loading…
View analytic
Saturday, November 18 • 1:40pm - 2:00pm
Magnolia: Generic Derivation 2.0

Sign up or log in to save this to your schedule and see who's attending!

Feedback form is now closed.


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.
The talk will explore how Impromptu is implemented, and show how dependent types allow the framework to be written in just 30 lines of code. I will then demonstrate how a similar approach may be used to concisely implement typed actors.

Furthermore, we take advantage of current research into implicit functions in Dotty to remove the last remaining boilerplate from Impromptu's API.

Speakers
avatar for Jon Pretty

Jon Pretty

Developer, Consultant, Entrepreneur and Evangelist, Propensive Ltd
Jon Pretty is an international man of Scala mystery.


Saturday November 18, 2017 1:40pm - 2:00pm
Data

Attendees (34)