ECMAScript 2016 will add SIMD capabilities and async functions

Changes to the JavaScript spec upgrade will 'drastically change the way you write JavaScript code'

ECMAScript 2016 will add SIMD capabilities and async functions
Credit: flickr/nyuhuhuu

Authors of ECMAScript 2016, the next upgrade to the standard underlying JavaScript, are readying async functions and SIMD capabilities for possible inclusion in the official specification.

Under a plan to have ECMAScript upgraded each year, the 2016 version would be available June 16 of next year, said Brian Terlson a Microsoft senior program manager  serving on ECMA Technical Committee 39, which is developing the specification. But Terlson, speaking at the QCon conference in San Francisco on Monday, cautioned that all feature plans are still tentative. The ECMAScript 2015 specification was approved in June, marking the most significant update to the standard in more than 15 years.

With async functions, ECMAScript 2016 would add syntax for promise return functions. "Async functions will drastically change the way you write JavaScript code," said Terlson, who works on Microsoft's Chakra JavaScript engine. Similar to async/await capabilities in the C# and Dart languages, async functions are already in the Babel JavaScript compiler and TypeScript.

ECMAScript 2016 also is on track to include a SIMD (single instruction, multiple data) numeric type, which would help exploit data-level parallelism. "It's strictly the ability to process more data and to process it simultaneously in a single thread," said Terlson. As an example, he demonstrated an application in which the frame rate was accelerated about four times via SIMD.

The 2016 specification will also include exponentiation operator capability, which takes a base number and offers the exponent of it. PadLeft and padRight, meanwhile, would pad out strings to fill out a certain number of characters.

Features under consideration for future ECMAScript editions include class property declarations and decorators, providing a declarative syntax for properties. This means that developers could add a property to an instance of a class without having to implement an instructor.

An Observables type for modeling push-based data sources such as DOM events, timer intervals, and sockets may be introduced to the standard library in ECMAScript 2017 or beyond. "Observables really help lay the foundation for a new syntax," Terlson said. Value types, such as int64 bignum, decimal, and complex, are under consideration as well.

One capability that could be a long way off, though, is JavaScript types. "It's an active area of investigation," said Terlson, who estimated a time frame of five years before developers can start talking about it. "It's a hard problem -- a very hard problem." Types, he said, all about finding errors. "The benefit of building it in is runtimes could then use it for performance advantages." There could be a solution implemented similar to what TypeScript offers, he said.

This story, "ECMAScript 2016 will add SIMD capabilities and async functions" was originally published by InfoWorld.

Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.