~/talk

Having a cake and eating it too Introduction to Typeclasses

Talkat Scalar 2016 · on Saturday, 2016-04-16· [scala, functional-programming]
slides:none on file

Someone builds a small auction domain in Scala, then replaces per-class methods with concrete type class instances for Number, JsonWriter and Evaluator so mean, toJson and evaluate become generic functions driven by implicits. Code compiles, tests pass, and wrapping boilerplate disappears by adding implicit ops that give operators and methods to plain types. The talk demonstrates ad hoc polymorphism for decoupling domain from features, shows instance implementations for Int Double BigDecimal and shows the technique scaling to multiple serializers and evaluators.

AI-written summary · about

  1. 0:00Start
  2. 1:39"The Mess"
  3. 3:48Subtype Polymorphism
  4. 11:50"Re-inventing the Wheel"
~/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.