~/talk

Effective Match Types

Talkat Scala Days 2025 Lausanne · 2025-08-19..08-21· [scala]
slides:none on file

Match types power Scala 3 features like generic tuples, named tuple extraction for route parameters and structural types, and type class derivation, while the compiler’s disjointness checking forces rules: avoid open traits or abstract types as patterns, prefer final/sealed classes, and expect no nested invariant bindings. Built‑ins in scala.compiletime.ops and tuple ops enable parsing, recursion and materializing values; benchmarks show match types beat implicits (50 vs 100‑element HList benchmark), but large recursions need bigger stack and lack a tail‑rec optimization.

AI-written summary · about

  1. 0:00Effective match types
  2. 1:05Match types in Scala
  3. 3:34Match types vs dynamic/static
  4. 4:59Demo: HTTP routing
  5. 9:15Defining match types
  6. 12:52Disjointness checking
  7. 17:32Rules and limitations
  8. 23:36Built-in match types
  9. 25:45Performance and complexity
  10. 29:09Real-world applications
  11. 33:21Refine types and use cases
  12. 37:17Challenges and future
  13. 40:07Troubleshooting stack size
  14. 40:32Q&A
~/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.