JavaScript spec adds async functions, shared memory

JavaScript spec adds async functions, shared memory

A few months before its expected approval, ECMAScript 2017, the latest official specification underlying JavaScript, has been fleshed out with async functions and shared memory capabilities.

ECMAScript 2017 is due to be finalized in June, in line with a release cadence that has seen midyear upgrades recently. "Async functions are a terrific tool for writing asynchronous code, and SharedArrayBuffer (shared memory) will enable library authors to experiment with real multiprocessing in JavaScript," said blogger Axel Rauschmayer, who follows JavaScript's development.

Async functions were a candidate for inclusion last year but were pushed out to this year. Shared memory, meanwhile, is coupled with atomics, providing atomic operations on shared memory locations.

ECMAScript 2017 also will include Object.values/Object.entries. Similar to the Object.keys capability, Object.values and Object.entries would return arrays, with an ordering matching Object.keys, with indices of all three resulting arrays matching the same key, value, or entry of an object, according to the ECMA proposal.

Also on tap is string padding, intended to improve the performance of the web and developer productivity. "Without a reasonable way to pad a string using native methods, working with JavaScript strings today is more painful than it should be," the proposal states. String padding functions exist in a majority of websites and frameworks.

The Object.getOwnPropertyDescriptors feature will simplify some common boilerplate, and allowing trailing commas in function parameter lists will provide for code attribution while making no changes to semantics. The proposal states that other languages, including Python and D, allow this capability so that code contributors can end a parameter addition with a trailing comma in a per-line parameters list, addressing the issue of code attribution.

Different features of ECMAScript are implemented in browsers at varying times. The most recent version of the specification, ECMAScript 2016, was approved last June and was limited in scope.

IDG Insider


«How the Nvidia Shield TV holds up as a game console


Apple to start assembling iPhones in Bangalore by April»
IDG Connect

IDG Connect tackles the tech stories that matter to you

Add Your Comment

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.


Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.



Will Kotlin overtake Java as the most popular Android programming language in 2018?