Upload
rick-beerendonk
View
425
Download
10
Embed Size (px)
Citation preview
Todayconst, let, default parameters, rest parameter, spread operator, destructuring, arrows, object literals, classes, proxy, iterators, for..of, generators, promise, unicode, normalize, modules, import, export, symbols, subclassing, reflection api, map, set, weakmap, weakset, typed arrays, template strings, string, number, array, math, binary literals, octal literals, regexp, exponentiation operator, object observe, async function...
Use today• ES 2015:
http://kangax.github.io/compat-table/es6/• ES 2016:
http://kangax.github.io/compat-table/es7/
Current browser• Shims• https://github.com/paulmillr/es6-shim/
• Transpilers• Babel: https://babeljs.io/• Traceur: https://
github.com/google/traceur-compiler
Why is JavaScript Hard?• JavaScript Jabber podcast: http://
devchat.tv/js-jabber/159-jsj-why-javascript-is-hard
Why is JavaScript Hard?• Different implementations
(browsers/transpilers/node/etc.)• Scope• This• Prototype• Verbose syntax• DOM/Array objects are not JavaScript
objects
Demo• GitHub:
https://github.com/rickbeerendonk/ECMAScript-2015-2016-Demos
Valid function declarationsa) function (x) { return x + x; };b) (x) => { return x + x; };c) [Method:] toString() { return "Hello"; }d) x => x + x;
all
Not transpilable featuresa) Modulesb) letc) Proxiesd) Subclassing built-inse) Iterators
c, d (partly)
TC-39 Process(0. Strawman)1. Proposal2. Draft3. Candidate4. Finished
See: https://docs.google.com/document/d/1QbEE0BsO4lvl7NFTn5WXWeiEIBfaVUF7Dk0hpPpPDzU/edit?pli=1
ES 2016• Exponential operator• Object.observe• Async functions
See: https://github.com/tc39/ecma262