13
ES6 A LOOK INTO YOUR FUTURE Created by / Jason Sich @jasich

ES6, A Look Into Your Future

Embed Size (px)

Citation preview

Page 1: ES6, A Look Into Your Future

ES6A LOOK INTO YOUR FUTURE

Created by / Jason Sich @jasich

Page 2: ES6, A Look Into Your Future

WHAT IS ES6?ECMAScript is the standard for the JavaScript languageES6 is the coming 6th edition of standardImplemented by vendors (Chrome, Firefox, Node.js, IE)Only a draft spec now, expected to be finalized in 2015

Page 3: ES6, A Look Into Your Future

HISTORY: IN THE BEGINNINGCreated by Brendan Eich at Netscape mid 90'sBecame a thingGot standardized with ECMATC39 is the technical committee in charge

Page 4: ES6, A Look Into Your Future

HISTORY: CH CHA CHANGESv2 for ISOv3 brought try/catch, Regex, & otherv4 stalled out

Page 5: ES6, A Look Into Your Future

HISTORY: NOT TO BENetscape tanked, Microsoft soared, & dev stoppedStarted again in 2005Committee split into two

ES4 committee looked to make major changesSubcommittee focused on smaller incremental change(ES3.1)

Page 6: ES6, A Look Into Your Future

HISTORY: HARMONYIn 2008 the groups were brought back togetherES4 was abandoned, wanted to avoid confusionES5 was created as a compromise, mostly based on ES3.1ES6 is a work to harmonize TC39 & the ECMAScriptlanguage

Page 7: ES6, A Look Into Your Future

WHAT'S IN ES6?arrows, classes, enhanced object literals, template strings, destructuring, default + rest + spread, let

+ const, iterators + for..of, generators, unicode, modules, module loaders, map + set + weakmap +weakset, proxies, symbols, subclassable built-ins, promises, math + number + string + object APIs,

binary and octal literals, reflect api, tail calls

Checkout for the list.github.com/lukehoban/es6features

Page 8: ES6, A Look Into Your Future

3 THINGS TO TALK ABOUT TODAYModulesClassesGenerators/Iteratorsother stuff too

Page 9: ES6, A Look Into Your Future

CODE EXAMPLE

Page 10: ES6, A Look Into Your Future

CURRENT SUPPORTBrowsersNodeCompliers/PolyfilsCheckout the ES6 Compatibility Table

Page 11: ES6, A Look Into Your Future

HOW TO SUPPORT ITUse a compiler to compile ES6 code to ES6

Like Traceur can precompile files to ES5 using node.jsOr it can compile at runtime (like my example code)

Use polyfils to use a subset of features you wantAsk people to turn on experimental flags?

github.com/google/traceur-compiler

Page 12: ES6, A Look Into Your Future

WHO'S USING IT?Ember

Using ES6 modulesAngular

Using ES6 modules & classesAdding annottation support for AtScript via Traceur

Page 13: ES6, A Look Into Your Future

THE ENDPresentation & Source code at github.com/jasich/harmony