~/talk

Shapely: Super Simple Typeclass Derivation

Talkat Scala Love 2022 · on Friday, 2022-02-18· [scala, compilers-and-language-design]
links:none on file
slides:none on file

Shapely provides automatic typeclass derivation for Scala projects by generating a compact abstract representation (case-class/ sealed-trait shapes) and mapping to/from user types with a macro on Scala 2 or native derivation on Scala 3. It targets supports Scala 2.11–3, uses a minimal number of macros, and benchmarks show runtime parity with hand-written instances with only one object allocation per conversion. It divides products and coproducts with AC/DC typeclasses, handles up to 64-field/variant shapes, and is already used to rewrite zio-json encoders/decoders.

AI-written summary · about

  1. 0:00Introduction and context
  2. 1:30Type classes in Scala
  3. 6:15Abstract data types
  4. 8:20The problem of derivation
  5. 14:30Introduction to Shapley
  6. 18:24AC DC type classes
  7. 24:30Usage and examples
  8. 26:42Advanced derivations
  9. 30:33Library internals
  10. 36:43Metaprogramming and annotations
  11. 42:40Handling recursion and lazy types
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.