~/talk

The many shapes of Polymorphism

Talkat Voxxed Days Zurich 2017 · on Thursday, 2017-02-23· [functional-programming]
links:none on file
slides:none on file

Argues that which polymorphism a language supports actually changes code shape, comparing Java, Scala, OCaml, Haskell, Go and Rust and showing concrete scala snippets: a Money trait with Fiat and Metal, show/serialize/plus examples, and a web‑service duplication refactor. Demonstrates the adapter pattern to regain type safety, contrasts parametric (generics), subtype polymorphism (inheritance pitfalls, variance issues) and type classes (less boilerplate in Haskell, harder in Scala, cannot add types at runtime), and recommends learning multiple languages to see tradeoffs.

AI-written summary · about

  1. 0:00Intro
  2. 2:15Optical Illusion
  3. 4:57Why do we use Types in programming languages?
  4. 5:10A type system is a tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute.'
  5. 6:41The need for polymorphism
  6. 9:32There are new discoveries in type systems
  7. 11:01Hypothesis: the way the Polymorphism is used defines the shape of our code
  8. 16:35Let's start working
  9. 19:43Let's try (real) subtype polymorphism
  10. 22:30We're mixing domain logic and behaviour
  11. 25:02Adapter Pattern
  12. 32:29Ad-Hoc polymorphism
  13. 34:02Type class cannot provide new types at runtime
  14. 35:00Mixing different types of polymorphism
  15. 35:19Mix subtype polymorphism with generic
  16. 35:42Mix generic polymorphism with ad-hoc?
  17. 36:07Polyglot programming
  18. 37:32Can type classes replace subtype polymorphism?
  19. 39:55Are type classes only for Functional Programming language?
  20. 41:13Addendum
  21. 41:50Thank you for your time Feedback please!
  22. 44:48Scala is a bridge from OOP to FP world
  23. 46:04Type inference and subtypes
~/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.