~/talk

When is an ADT not an ADT?

Talkat Scala Days 2023 Madrid · 2023-09-12..09-14· [scala, software-architecture]
slides:none on file

Compares two Scala encodings of a tiny expression DSL (ints, +, -, , equality) and shows concrete tradeoffs: an OOP/subtyping encoding uses classes, a common num type parameter for the expression normal form, and builds a pretty-printer, while the algebraic (case class + pattern match) encoding builds eval and an optimizer*. Demonstrates that OOP makes adding new terms easy but adding interpreters hard, ADTs make adding interpreters easy but adding terms hard, and mentions object algebras / tagless final as hybrid solutions.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:02Defining software quality
  3. 6:12The problem setup
  4. 9:32Object-oriented approach
  5. 12:44Extending with new types
  6. 15:08Adding interpreters
  7. 19:02Evaluating OO extensibility
  8. 22:40Functional approach
  9. 25:57Functional extensibility
  10. 30:01The expression problem
  11. 34:35Conclusion and takeaways
~/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.