Upload
jasonsich
View
144
Download
0
Embed Size (px)
Citation preview
ES6A LOOK INTO YOUR FUTURE
Created by / Jason Sich @jasich
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
HISTORY: IN THE BEGINNINGCreated by Brendan Eich at Netscape mid 90'sBecame a thingGot standardized with ECMATC39 is the technical committee in charge
HISTORY: CH CHA CHANGESv2 for ISOv3 brought try/catch, Regex, & otherv4 stalled out
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)
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
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
3 THINGS TO TALK ABOUT TODAYModulesClassesGenerators/Iteratorsother stuff too
CODE EXAMPLE
CURRENT SUPPORTBrowsersNodeCompliers/PolyfilsCheckout the ES6 Compatibility Table
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
WHO'S USING IT?Ember
Using ES6 modulesAngular
Using ES6 modules & classesAdding annottation support for AtScript via Traceur
THE ENDPresentation & Source code at github.com/jasich/harmony