JSConf 2015 Jonathan Martin
summary
Claims that native closures can be replaced by a small runtime that maps var/params to setter/getter/function helpers, implements scopes with a closure registry and prototypal forks, and is test-driven with mocha and chai; live codes a working polyfill and a transpiler at github.com/nibbler/closures; core API exposes s/g/F helpers and a stack-based registry, the implementation compiles to about 68 lines of code and the demo passes the specs so the approach actually works.
AI-written summary · about
chapters (13)
- 0:00Start
- 0:18Gotomeeting
- 2:06Fortran
- 2:47Ruby
- 14:41Variable Shadowing
- 15:28Scopes That Can Inherit Variables from Other Scopes
- 15:53Prototypes
- 16:09Prototypical Inheritance
- 17:15Method of Prototypical Inheritance
- 20:53Wrapper Function
- 21:27Params
- 25:55Create a Closure Registry
- 29:24Push and Pop Methods
related talks
33mYou Won't Believe This One Weird Way to Rewrite Closures
44mJavaScript - From Birth to Closure
15mJavaScript: Getting Closure
35mAshley Williams - SeattleJS Conference 2017
30m"JavaScript, the Real Bad Parts"
38mJavaScript VM internals, EventLoop, Async and ScopeChains
40mYou might not need JavaScript classes
56mThe Better Parts
