The story of when assumption met a magic hat
summary
Argues that a small, enforced subset of JavaScript makes code easier to reason about and fails fast on bad assumptions, using inline assert checks and a translation-based use restrict mode that replaces operators with checked helpers (dunder_add, dunder_div). Demonstrates a source-rewriter called JSShaper, runs it against real projects, reports only a handful of required fixes and a caught bug, and shows NaN and string/number confusion turn into immediate, actionable exceptions.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:15Correct code
- 1:50Coding mistakes
- 3:49Assumptions and reality
- 10:53assert
- 14:42benefits
- 16:28assumption jammers
- 20:05the plus case








