~/talk

Mastering Typeclass Induction

Talkat Typelevel Summit Copenhagen 2017 · on Saturday, 2017-06-03· [functional-programming]
slides:none on file

Shows how to derive typeclass instances for type-level lists by giving a concrete base-case and an inductive implicit that composes head and tail instances, using Scala implicit resolution (no macros). Builds a dynamic dispatch that parses heterogeneous event types into a nested Either-in-Option result using available parsers, paying one static object allocation and one method indirection per list step. Uses the technique in production for SoundCloud event routing and reports no discernable overhead while processing two billion events an hour.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:04The problem: event parsing
  3. 5:05Outline of the talk
  4. 5:28Understanding induction
  5. 8:25Induction in programming
  6. 11:55What are type classes?
  7. 14:50Implicit resolution power
  8. 16:46Type class induction
  9. 20:26Deriving instances
  10. 25:25Solving dynamic dispatch
  11. 30:56Advanced applications
  12. 32:03Q&A 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.