~/talk

Pattern Matching in JS

Talkat JSConf US 2018 · on Thursday, 2018-08-23· [javascript, developer-experience]
slides:none on file

JavaScript gains a stage 1 proposal for pattern matching that borrows destructuring to replace brittle switch logic, adding a when keyword and variable binding so reducers and callbacks can match {type, data} without eager evaluation bugs (no more state + undefined on reset). Implementation experiments include a SweetJS macro and a Babel plugin PR, and the spec lives as issues on the TC39 GitHub; the concrete claim is safer, clearer case handling and practical tooling to try it today.

AI-written summary · about

  1. 0:00Intro
  2. 2:55Switch Statements
  3. 5:29Ternary Statements
  4. 7:06Object Literal
  5. 8:38Redux Reducers
  6. 9:46Switch Statement
  7. 10:38Destructuring
  8. 12:27Elm
  9. 13:13Rust
  10. 13:35Elixir
  11. 14:05Water Bottle
  12. 14:59JavaScript
  13. 16:18Default Values
  14. 17:28Arrays
  15. 18:11Rest Argument
  16. 18:55UpdateState
  17. 19:42Destructuring Action
  18. 20:23Variable Assignment
  19. 21:23Node
  20. 22:44Conditionals
  21. 23:40Where is Pattern Matching
~/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.