~/talk

CASE STUDY FOR A REAL-WORLD TYPE-LEVEL PROGRAMMING

Talkat Scalar Conference 2017 · 2017-04-07..04-08· [scala]
slides:none on file

A compile-time JSON codec generator uses shapeless (Generic, HLists, coproducts) to derive Play JSON type class instances so case classes with more than 22 fields and sealed trait hierarchies serialize without hand-written code. It replaces fragile macros from play-json (one 700-line macro) with about 50 lines of custom shapeless code, handles optional fields by omitting None, falls back to play-json defaults for primitives, and successfully produces usable serializers and deserializers.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:44The problem with JSON
  3. 8:12Analyzing macro complexity
  4. 10:24Shapeless fundamentals
  5. 14:00Implementing custom codecs
  6. 19:44Co-products and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.