~/talk

JavaScript inheritance: beyond the basics

Talkat JSConf EU 2012 · 2012-10-06..10-07· [javascript, typescript]
slides:none on file

Shows a tiny ES5 object exemplars library (under 50 lines) that creates types via prototypes not constructors and it works as a drop‑in pattern using Object.create and an extend/new API; proves classes are syntactic sugar by translating ES6 class syntax to constructor + prototype and formalizes super calls via the home object semantics; documents upcoming inclusion of __proto__ for getting/setting prototypes, and notes Traceur/TypeScript as practical transpiler tools.

AI-written summary · about

  1. 0:00Start
  2. 0:46What you will learn?
  3. 4:41Ist Examples: function exemplar, object exemplar
  4. 5:55Function exemplars: constructor versus prototype
  5. 9:12The example as code
  6. 11:20Proto js: the code
  7. 11:45ECMAScript 6 classes
  8. 15:08Super-calls
  9. 17:57Where does HomeObject come from?
  10. 20:17Use case: get the prototype
  11. 21:43Use case: subtyping Array
  12. 23:13Caveat: objects as maps from strings to values
~/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.