May 12th, 2015
We see a lot of excitement around ES2015 across a number of feedback channels. For example, ES2015 features have amassed thousands of votes on our UserVoice. We have been working on building comprehensive ES2015 support over the last year so you can use these great new features.
We’ve also been driving interoperability among implementations and compatibility with the web by carefully implementing new ES2015 features and bringing data about our implementation experience back to other implementers and the TC39 committee. We’ve also been working on test262 collateral to help all implementers create interoperable implementations of ES2015 more quickly. But we know that the excitement doesn’t stop at ES2015 – already proposals for ES2016 and beyond are gaining steam – so we’ve been doing some early investigations into these as well.
Microsoft Edge & ES2015
Default parameters is an often requested feature but were deceptively difficult to implement due to the special intermediate scope default parameter initializers run in (see figure 3). While default parameters are not too challenging to get working at a basic level, optimizing them is hard, and so the basic support for default is semantically mostly correct (with a notable exception, see figure 4) but doesn’t perform as well as we’d like and so remain behind the experimental flag for now.
Generators is another feature that has a huge amount of excitement behind it (I often talk about how generators can significantly improve your asynchronous code, for example). We have not had time to address late spec changes to generator semantics that added the return method to the iterator interface and the associated changes to the for-of loop and other language features to invoke return when finishing iteration. Because this might significantly impact compatibility with other generator implementations, we’ve opted to keep generators behind the experimental flag until we implement the return functionality.
While ES2015 support across browsers is rapidly gaining steam, many of you don’t have the luxury of only targeting the latest browsers. Thankfully transpilers have really taken off in a big way with tools like TypeScript, Babel, and Traceur supporting various ES2015 features as well (with Babel getting an impressive 76% on the ES6 Compat Chart). These tools are really exciting as they enable you to write your code in ES2015 and compile the ES2015 code to ES5/3 code before deploying to production. In the future when ES2015 support is available in the browsers you support you can drop the transpiler and deploy the ES2015 code directly.
In addition to finalizing our experimental features and getting them enabled by default, we will be working on a number of other fronts as well over the coming months. With Microsoft Edge now evergreen, we will have a much more rapid and regular release cadence. Expect to see more ES2015 features come online, either enabled by default or behind the experimental flag, over the next few months. Going ahead, we plan to preview new features behind flags so you can try them out before they make it into the stable browser. You can stay on top of our progress by watching our platform roadmap published at Microsoft Edge Platform Status.
The Chakra team will also be contributing test collateral to ECMAScript’s official test suite Test262 to help ensure that all ES2015 implementations are interoperable. Test262 collateral is closely tracked by all the major implementers which makes it a very easy and powerful way to help implementers find bugs and ensure that developers don’t have to work around bugs in one implementation or another. We believe strongly that test262 is a force for good on the Web and will continue serving as the editor of the test suite going forward.
– Brian Terlson, Senior Program Manager, Chakra Team