~/talk

Polymorphism in Scala

Talkat Scala Days Lausanne 2019 · 2019-06-11..06-13· [scala]
slides:none on file

Compares four polymorphism techniques in Scala—subtyping, generics (parametric polymorphism), implicits/typeclasses, and ad hoc pattern-based dispatch—by implementing a reusable Printer typeclass using implicits and companion-object instance discovery. Shows how the Scala compiler selects implementations, how variance and higher-kinded type parameters affect APIs, which approaches require boilerplate, and when instance forwarding or default instances reduce code; includes small runnable examples and a few failure cases that reveal surprising loss of type information.

AI-written summary · about

  1. 0:00Polymorphism in Scala
  2. 4:18Function parameter inclusion
  3. 8:31Parameter combinations
  4. 13:19Firewall details
  5. 16:33Variance in containers
  6. 20:54Modifying classes
  7. 24:09Interface design
  8. 27:51Object lifecycle
  9. 30:56Parameter context
  10. 34:45External interfaces
  11. 37:51Boilerplate
  12. 40:57Summary
~/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.