~/talk

Making Unreasonable States Impossible

Talkat React Finland 2018 · on Thursday, 2018-04-26· [javascript, react]
slides:none on file

Claim: variant types and pattern matching in Reason plus ReasonReact and Flow produce APIs that are truly impossible to misuse. Examples: a tic‑tac‑toe app with a tuple board of three rows that the compiler rejects if it has the wrong length, exhaustive pattern matching that forces handling of turn/win/draw, and a remote data type (NotAsked/Pending/Success/Error) that prevents invalid loader states. Code compiles via BuckleScript to JS, the demo runs and the compiler catches missing cases at compile time.

AI-written summary · about

  1. 0:00Introduction
  2. 2:11Type-driven development
  3. 3:16Tic-tac-toe without types
  4. 4:41Adding Flow types
  5. 6:29Refactoring to impossible states
  6. 9:46Switch statements vs pattern matching
  7. 11:37Safe board representation
  8. 14:54Live coding Tic-Tac-Toe in ReasonML
  9. 23:10Conclusion
  10. 24:55Handling remote data safely
  11. 27:23Live coding loader component
  12. 30:58Summary & Q&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.