Slide 1

Slide 1 text

kyle simpson http://getify.me @getify wrangling transpilation

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

ES6/2015

Slide 4

Slide 4 text

Block-Scoped Declarations Spread / Rest Default Parameter Values Destructuring Object Literal Extensions Template Literals Arrow Functions `for..of` Loops Regular Expression Extensions Number Literal Extensions Unicode Symbols Iterators Generators Modules Classes

Slide 5

Slide 5 text

Promises Generators + Promises Typed Arrays Maps WeakMaps Sets WeakSets `Array` `Object` `Math` `Number` `String` Function Names Meta Properties Well Known Symbols Proxies `Reflect` API Tail Call Optimization (TCO)

Slide 6

Slide 6 text

array spread

Slide 7

Slide 7 text

array spread

Slide 8

Slide 8 text

array spread

Slide 9

Slide 9 text

array spread

Slide 10

Slide 10 text

array gather (aka "rest")

Slide 11

Slide 11 text

array gather (aka "rest")

Slide 12

Slide 12 text

parameter defaults

Slide 13

Slide 13 text

parameter defaults

Slide 14

Slide 14 text

destructuring

Slide 15

Slide 15 text

destructuring & concise properties

Slide 16

Slide 16 text

destructuring (renaming/defaults)

Slide 17

Slide 17 text

destructuring (renaming/defaults)

Slide 18

Slide 18 text

destructuring & restructuring

Slide 19

Slide 19 text

destructuring & restructuring

Slide 20

Slide 20 text

destructuring & restructuring

Slide 21

Slide 21 text

excited yet!?

Slide 22

Slide 22 text

ES6 browsers are ubiquitous, right?

Slide 23

Slide 23 text

ES6 browsers are ubiquitous, right? not exactly. :(

Slide 24

Slide 24 text

transpiling ftw

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

polyfills ftw

Slide 27

Slide 27 text

github.com/paulmillr/es6-shim/

Slide 28

Slide 28 text

what features do you need?

Slide 29

Slide 29 text

96% of all JS programs need less than 37% of ES6

Slide 30

Slide 30 text

96% of all JS programs need less than 37% of ES6 *totally made up * *

Slide 31

Slide 31 text

Microsoft Edge 0.11.10074.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0

Slide 32

Slide 32 text

Microsoft Edge 0.11.10074.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

transpiling & polyfilling: can't • several well-known symbols • subclassing natives • __proto__ • tail call optimization (rewriting to tail calls can) https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/ suggestions/6850816-es6-tail-call-optimization • others... caveats

Slide 35

Slide 35 text

transpiling ftl polyfills ftl

Slide 36

Slide 36 text

feature testing ftw

Slide 37

Slide 37 text

feature testing: APIs

Slide 38

Slide 38 text

feature testing: syntax

Slide 39

Slide 39 text

feature testing: syntax

Slide 40

Slide 40 text

https://FeatureTests.io

Slide 41

Slide 41 text

https://FeatureTests.io

Slide 42

Slide 42 text

demo

Slide 43

Slide 43 text

don't shy away from ES6+, start using these features now

Slide 44

Slide 44 text

ongoing gap

Slide 45

Slide 45 text

don't serve code on the trailing edge of that gap

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

transpiling & polyfilling is about developing for the current/future

Slide 48

Slide 48 text

serve the right code for the right browser

Slide 49

Slide 49 text

demo

Slide 50

Slide 50 text

transpile always?

Slide 51

Slide 51 text

can it write better code than we can?

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

uglify

Slide 54

Slide 54 text

demo

Slide 55

Slide 55 text

kyle simpson http://getify.me @getify thanks! https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20& %20beyond/README.md#you-dont-know-js-es6--beyond