ECMAScript6を目標を理解する
ECMAScript Language Specification ECMA-262 6th Edition – DRAFTのIntroductionには、次のようにECMAScript6の機能追加の目標が定められています。
Goals for the sixth edition include providing better support for large applications, library creation, and for use of ECMAScript as a compilation target for other languages. Some of its major enhancements include modules, class declarations, lexical block scoping, iterators and generators, promises for asynchronous programming, destructuring patterns, and proper tail calls. The ECMAScript library of built-ins has been expanded to support additional data abstractions including maps, sets, and arrays of binary numeric values as well as additional support for Unicode supplemental characters in strings and regular expressions. The built-ins are now extensible via subclassing.
これに準拠して、ECMAScript6の機能を理解していきます。次の通りです。
(引用:Rubyist Magazine - 2015 年の JavaScript と babel の話)
- モジュール
- クラス定義