~/talk

Advanced Pattern Matching in C#

Talkat NDC London 2026 · 2026-01-26..01-30· [dotnet, functional-programming]
slides:none on file

Walks through concrete C# pattern features added in C# 7–11 pattern features (type, property, positional/tuple, relational, list and spread patterns), shows span<T> for performance when matching lists, and ports a Haskell red‑black tree balance function into C# using pattern matches. Demonstrates a runnable library with 514 unit tests passing, explains how tuple syntax becomes positional patterns, and proves the port is concise, maintainable and functionally equivalent to the original implementation.

AI-written summary · about

  1. 0:00Introduction to pattern matching
  2. 1:26Use cases and perspective
  3. 3:21Porting algorithms
  4. 6:09C# feature history
  5. 8:20Syntax examples and basics
  6. 12:37Advanced pattern matching
  7. 16:28Nested paths and Refactoring
  8. 19:43List and Span matching
  9. 26:00Interesting side cases
  10. 35:56Changing industry guidance
  11. 39:56Functional programming in C#
  12. 48:32Porting complex examples
  13. 52:57Live demo and conclusion
~/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.