~/talk

ECMAScript Regrets

slides:none on file

Catalogs specific JavaScript pitfalls, gives concrete fixes and linters and shows which issues are unfixable in practice. Calls out Number.isNaN as the correct ES6 fix for NaN versus the broken isNaN, explains why typeof null === "object" (C implementation tag) and why that can’t be changed, points to an eslint rule to ban shadowing globals like undefined, warns about stateful regexps with /g, recommends using ES6 arrow functions or a captured this pattern and notes DOM convenience node.remove and XHR/localStorage quirks.

AI-written summary · about

  1. 0:00Introduction
  2. 0:40Origin of web regrets
  3. 2:08Why the web cannot be fixed
  4. 3:10Documenting javascript regrets
  5. 4:32Example: NaN and isNaN
  6. 7:15Example: Typeof null
  7. 9:02Example: Reserved keywords
  8. 10:12Example: This context
  9. 12:06Example: Stateful regexps
  10. 13:06Example: Operator precedence
  11. 14:06Conclusion and recommendations
  12. 15:04Avoiding future regrets
  13. 16:19Regrets in CSS and DOM
~/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.