~/talk

Type Classes for the Rest of Us

Talkat Scale By the Bay 2017 · 2017-11-16..11-18· [functional-programming, scala]
links:none on file
slides:none on file

Shows how Scala type classes replace ad-hoc serialization patterns by building a compiler-enforced deserialize[A] returning Option that avoids runtime exceptions, migrates per-type boilerplate into implicit type-class instances, and then reduces ceremony with simulacrum while validating laws with discipline and ScalaCheck. Demonstrates a CSV-like parser example, notes runtime hazards of Salat reflection, reports ~33% of the audience had written type classes, and argues the approach works but isn't always better than inheritance.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:08Goals of type classes
  3. 2:51Naive deserialization attempt
  4. 5:41Adding Option for safety
  5. 7:53Moving to compile-time checks
  6. 10:22Discovering type classes
  7. 11:26Type class structure explained
  8. 13:16Multiple instances per type
  9. 14:21Simulacrum and lawfulness
  10. 15:24Where type classes shine
  11. 16:29Operator overloading with type classes
  12. 18:11Where type classes don't fit
~/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.