# New typeclass derivation library for Scala 2 and 3

**URL:** <https://contributors.scala-lang.org/t/new-typeclass-derivation-library-for-scala-2-and-3/5654>\
**Category:** Community\
**Created:** [March 22, 2022, 3:23pm UTC](https://contributors.scala-lang.org/t/new-typeclass-derivation-library-for-scala-2-and-3/5654 "2022-03-22T15:23:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fommil](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/fommil/32/1006_2.png) [@fommil](https://contributors.scala-lang.org/u/fommil)\
**Post date:** [March 22, 2022, 3:23pm UTC](https://contributors.scala-lang.org/t/new-typeclass-derivation-library-for-scala-2-and-3/5654/1 "2022-03-22T15:23:34Z")

</div>

With this talk and library I wanted to create a high performance typeclass derivation library that worked equally for Scala 2 and 3.

[![](https://img.youtube.com/vi/hIssqESXgfI/maxresdefault.jpg "Sam Halliday - Shapely: Super Simple Typeclass Derivation") ](https://www.youtube.com/watch?v=hIssqESXgfI)

Source code at [Sam Halliday / shapely · GitLab](https://gitlab.com/fommil/shapely/)

Slides at [Shapely](http://fommil.com/scalalove22/)

A shame that `@deriving` doesn’t work on both Scala 2 and 3 because that would have made for an excellent way to migrate to 3 in increments, and even cross build for a time. Let’s keep chat about that particular aspect to [Pre-typer syntactic plugins in Scala 3?](https://contributors.scala-lang.org/t/pre-typer-syntactic-plugins-in-scala-3/5565)
