Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Future is Now: JavaScript, ES6, and Babel JS
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tim Griesser
February 20, 2015
Technology
1.3k
7
Share
The Future is Now: JavaScript, ES6, and Babel JS
ConFoo, Feb. 2015
http://babeljs.io
Tim Griesser
February 20, 2015
More Decks by Tim Griesser
See All by Tim Griesser
SDL as an Artifact: Code-First Schemas in TS & JS
tgriesser
0
150
SDL as an Artifact: Code-First Schemas and GraphQL Nexus
tgriesser
0
200
End-to-End Testing for the Modern Web
tgriesser
0
160
Paving a New Path for GraphQL Schemas
tgriesser
0
100
Embracing the Power of GraphQL
tgriesser
2
1k
Redux: A Predictable State Container for JavaScript Apps
tgriesser
2
450
Making Relational Cool Again (or: JavaScript on ACID)
tgriesser
1
440
Data Based JavaScript
tgriesser
1
260
Nodevember - Making Relational Cool Again
tgriesser
1
200
Other Decks in Technology
See All in Technology
MLOps導入のための組織作りの第一歩
akasan
0
380
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
170
Choose your own adventure in agentic design patterns
glaforge
0
150
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
160
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
250
AI時代のガードレールとしてのAPIガバナンス
nagix
0
310
音声言語モデル手法に関する発表の紹介
kzinmr
0
140
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
490
Building a Standalone Programming Environment
harukasan
PRO
1
100
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
110
Route 53 Global Resolver で高額課金発生!
otanikohei2023
0
120
扱える不確実性を増やしていく - スタートアップEMが考える「任せ方」
kadoppe
0
320
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Crafting Experiences
bethany
1
120
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
YesSQL, Process and Tooling at Scale
rocio
174
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Optimizing for Happiness
mojombo
378
71k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
The Invisible Side of Design
smashingmag
303
52k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Transcript
The Future Is Now! JavaScript, ES6 and Traceur @tgriesser
The Future Is Now! JavaScript, ES6 and Traceur @tgriesser ^6-to-5
The Future Is Now! JavaScript, ES6 and @tgriesser
JavaScript isn't the best language…
None
"Future proof" convenience
What? How? Why?
babeljs.io
Terminology
Transpile: Source-to-Source Compilation
None
Transform: Simple syntax conversion
Transform:
Transform:
Polyfill: Providing language features that would expect to be available
natively
None
IE8: Object doesn’t support property or method ‘indexOf’
None
IE8: // 1
Some New Features • Arrow Functions • Strings / Template
Strings • Default Parameters • Rest / Spread Params • Destructuring Assignment • Object literal extensions • Modules • Classes • Symbols • Iterators • Generators • Promises
Arrow Functions
Arrow Functions
Arrow Functions
Arrow Functions
Arrow Functions
Arrow Functions
Arrow Functions
Arrow Functions
New String Functions
New String Functions str.codePointAt: unicode codepoint str.normalize: unicode normalization, not
polyfilled by default - github.com/walling/unorm
Template Strings
Template Strings
Default Parameters
Default Parameters
Rest arguments
Spread Arguments
Destructuring Assignment
Object Literal Extensions
Object Literal Extensions
Object Literal Extensions
Object Literal Extensions
const
let
let
Modules • Unify the experience of separating & including code
from multiple files (modules) • Similar to CommonJS • Can work with various module formats (UMD, AMD)
None
None
Class Syntax • Syntax "Sugar" to Prototype Classes • Sets
up proper inheritance chain • Reference inherited methods with super.methodName() • Cannot have prototype or static props
• No static or prototype properties • Getters & setters
will only work in IE 9+ Class Syntax
Class Syntax • No static or prototype properties • Getters
& setters will only work in IE 9+
Symbol() • New primitive type, unique • Access control for
property state • Also used for new protocols "Symbol.iterator"
Symbols • No static or prototype properties • Getters &
setters will only work in IE 9+
Symbols • No static or prototype properties • Getters &
setters will only work in IE 9+
Iterators • Ability to treat any value as a collection
with a standard API • Allows for use with for-of loop
Iterators
Iterators
Iterators
Promises, Generators • Simplify Async (callback hell)
Promises, Generators • Simplify Async (callback hell)
Promises, Generators • Simplify Async (callback hell) • Promises: like
async try / catch in JavaScript • Generators: Async / Await • Utilize iterators
Kangax compat table
How to Get Started?
Try it out
In the Browser
Node.js
None
Suggestions for Adoption • Introduce into test suites • Gradually
introduce different new features • Check support if you have questions
Support:
June 18, 2015 "…when the ECMA General Assembly will vote
on and approve the 6th edition of Ecma-262 and usher in the next era of JavaScript." http://bocoup.com/weblog/stabilizing-es6/
None
@tgriesser Questions?