~/talk

Everything is Permitted: Extending Built-ins

Talkat JSConf US 2011 · 2011-05-02..05-03· [javascript]
slides:none on file

History shows Prototype starts at 104 lines and by 1.4 adds ~30 methods, which breaks for in loops when extending object prototypes, so the claim is that safe extension requires specifics not slogans. Practical tools include ES5's Object.defineProperty to make nonenumerable methods and the canonical function.prototype.bind polyfill. Node examples actually augment Date for timezones and work. Language proposals like scoped object extensions or refinements aim to isolate extensions lexically.

AI-written summary · about

  1. 0:00Introduction
  2. 4:28Prototype early days
  3. 8:15Prototype evolution
  4. 11:45Ethics of modifying built-ins
  5. 15:18Active Support extensions
  6. 19:59Risks of monkey patching
  7. 23:33Best practices for extensions
  8. 26:42Safe built-in extensions
  9. 30:12Polyfilling ES5 methods
  10. 31:57Standardizing Function.prototype.bind
  11. 33:22Future of class boxes
  12. 36:57Conclusion and 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.