Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modern JavaScript - Introduction to ECMAScript 2015 & 2016

Modern JavaScript - Introduction to ECMAScript 2015 & 2016

Yusuke Miyazaki

June 20, 2016
Tweet

More Decks by Yusuke Miyazaki

Other Decks in Programming

Transcript

  1. Introduction to ECMAScript 2015 & 2016
    ޒेཛྷɾ຤Ӭݚڀࣨன৯ձ
    :VTVLF.JZB[BLJ
    !૯߹ݚڀ߸ؗ
    Modern JavaScript

    View full-size slide

  2. JavaScript
    • Not Javascript
    • cf. OCaml

    View full-size slide

  3. Why JavaScript?
    • Used in everywhere!
    • Web Browsers (Desktop & Mobile)
    • Node.js (Server)

    View full-size slide

  4. Table of Contents
    • History of JavaScript
    • Features of ECMAScript 2015 & 2016
    • How to Write Modern JavaScript

    View full-size slide

  5. JavaScript & ECMAScript
    • JavaScript (JS)
    • Programming language
    • ECMAScript (ES)
    • Language specification (ECMA-262)
    standardized by Ecma International
    • Other standards: ECMA-334 (C#)

    View full-size slide

  6. History of JavaScript

    View full-size slide

  7. Beginnings of JavaScript
    "JavaScript was originally developed in 10 days in
    May 1995 by Brendan Eich, while he was working
    for Netscape Communications Corporation."
    From Wikipedia

    View full-size slide

  8. History of ECMAScript
    • Edition 1: June 1997
    • Edition 2: June 1998
    • Edition 3: December 1999
    • Edition 4: Abandoned!!

    View full-size slide

  9. History of ECMAScript
    • Edition 5: December 2009
    • Almost supported in so-called "modern" browsers
    • Features
    • strict mode
    • Array.prototype.map/filter/reduce
    • JSON

    View full-size slide

  10. History of ECMAScript
    • Edition 6: June 2015
    • ECMAScript 2015, not ECMAScript 6
    • ECMAScript will be released annually
    • Stages: 0 Strawman -> 1 Proposal ->

    2 Draft -> 3 Candidate -> 4 Finished

    View full-size slide

  11. History of ECMAScript
    • Edition 6: June 2015
    • Implementation in progress…
    • WebKit 100%?
    • Firefox/Edge/Chrome/Node.js 90%+
    • See compat table for more details

    View full-size slide

  12. History of ECMAScript
    • Edition 7: June 2016
    • Minor update from ECMAScript 2015

    View full-size slide

  13. Features of

    ES 2015 & 2016

    View full-size slide

  14. Links
    • http://kangax.github.io/compat-table/es6/
    • http://es6-features.org/
    • https://webkit.org/blog/6240/ecmascript-6-
    proper-tail-calls-in-webkit/

    View full-size slide

  15. How to Write
    Modern JavaScript

    View full-size slide

  16. Use modern impl.
    • Server-side app. (Node.js 6+)
    • Support only modern web browsers

    View full-size slide

  17. Use Transpilers
    • Compile JS code to JS code
    • e.g. ECMAScript 2015 -> ECMAScript 5
    • Implementations
    • Babel
    • Traceur

    View full-size slide

  18. Conclusion
    • JavaScript is getting better day by day
    • Write "modern" JavaScript
    • Use some tools to write modern JavaScript

    View full-size slide