Paul Krill
Editor at Large

ECMAScript 2016 will add SIMD capabilities and async functions

news
Nov 17, 20153 mins

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

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author