Translator: Not mainstream fairy tales

The original link

ES6 brings a lot of new and cool features to Javascript. It learns from many of Javascript’s past mistakes and introduces many language features that are clear and easy to understand. Let and const are examples. These two keywords make block scope declarations and are therefore less prone to errors caused by misunderstanding the var scope. ES6 also includes features designed specifically for common JavaScript writing styles to make them feel more natural. For example, the arrow function makes it easy for developers to write short functions and helps Javascript programmers do what they often do: bind this lexically. The class syntax makes ES6 easy to write classic object-oriented code that is common in other languages. The deconstruction syntax helps you weed out the auxiliary code in large Javascript programs (boiler plate? . We at WebKit are very excited about the new ES6 features and have been working hard to implement them. In Safari 9 on OS X and iOS 9, you’ll see some of the great ES6 features:

  • class
  • Promises
  • WeakMap, Set, WeakMap, WeakSet, for… Of circulation
  • Symbol type
  • And other great features

If you use the latest WebKit Nightly Build, you can try even more of the ES6 features. We recently implemented:

  • let, const, and class block scoping
  • Most reflection apis
  • Most of the current Module specifications
  • Tail-call optimization
  • Default Parameter Value
  • Default deconstruction value
  • Arrow function
  • Some internationalization apis
  • And more

If you’re interested in following our ES6 implementation and trying out the ES6 features, download WebKit NIGHTLY Build. You can report bugs to help us fix bugs in the current implementation. And, if you (you read that right, dear reader) are interested in adding features to WebKit or even fixing a few bugs, I’d be happy to help you get started. You can follow me on Twitter @saambarati. And as always, you can keep in touch with @jonathandavis on other issues, too.