~/talk

You Won't Believe This One Weird Way to Rewrite Closures

Talkat MountainWest JavaScript 2015 · 2015-03-27..04-01· [javascript]
slides:none on file

Claims a full rewrite of closures using only JavaScript primitives and one global variable and proves it with tests and a working transpiler, implementing replacement primitives S/G/F, a closure registry, forked scope objects via prototypal inheritance, push/pop contexts, an args helper and amnesic function bodies, all composed into about 70 lines that pass specs and transpile examples online, yielding a functioning alternative to native lexical closures and a demo that actually executes and returns the expected values.

AI-written summary · about

  1. 0:00Introduction and context
  2. 1:10Critique of closures
  3. 3:32Defining the polyfill rules
  4. 6:15Substitution strategy
  5. 7:29Implementing global context
  6. 10:15Push and pop mechanics
  7. 16:03Function helper definition
  8. 19:33Lexical scope challenges
  9. 21:59Building the closure registry
  10. 30:50Conclusion and future plans
~/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.