~/talk

There Is No Such Thing as a 'Generic'

Talkat revo.js 2023 · 2023-10-04..10-06· [typescript]
slides:none on file

Main claim: there is "no such thing as a generic" — only generic types vs generic functions with distinct behavior. Demonstrates with Set, Map, pick, createStringMap and uniqueArray examples, showing that generic types require type arguments while generic functions infer from values or explicit type arguments, that inference becomes the source of truth, and that type parameters can be passed between functions (effectively currying types) to produce precise, usable typings that catch mistakes.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:05Why language matters in TypeScript
  3. 2:30The problem with 'generics' terminology
  4. 5:38Generic types as type functions
  5. 10:14Generic functions and type inference
  6. 15:39Breaking down the pick function example
  7. 19:31No such thing as a generic
  8. 20:14Live coding exercises
  9. 28:01When to use generics
~/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.