~/talk

The sceptics guide to pattern matching

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [frontend-architecture]
slides:none on file

C# pattern matching evolves from C#7 through C#10 into concrete features: switch expression, property pattern, positional pattern, plus type, constant, discard, var, relational and logical patterns. The compiler rewrites patterns into nested type/null checks and jumps (so decompiled code looks like ifs/gotos), relational patterns only compare to constants, null-checks are automatic, and the compiler enforces exhaustiveness. Practical wins: concise state tables (toll/peak-time example), cleaner tree algorithms and a compact red‑black tree rebalance, all reducing nested ifs and extracting deep data.

AI-written summary · about

  1. 0:00Introduction
  2. 2:00Pattern matching in other languages
  3. 6:44Patterns in C
  4. 6:57Where to use patterns
  5. 9:57Type patterns
  6. 14:52Property patterns
  7. 17:47recursive patterns
  8. 24:20positional patterns
  9. 26:24Deconstruction
  10. 32:06How do patterns work
  11. 45:24Switch
  12. 47:08Examples
  13. 49:26Peak Time Premium
  14. 51:56What patterns are good for
~/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.