So far, four proposals have been finalized for inclusion in the ECMAScript 2018 specification, said Zibi Braniecki, a senior software engineer at Mozilla who participates in the development of ECMAScript.

Lifting of the template literal restriction, to enable the embedding of languages, including domain-specific languages (DSLs). Currently, restrictions on escape clauses make this a problem. The revision cleans up the behavior of literals, letting them be used for DSLs so programmers can create their own minilanguages if neeeded.

Adding the s (dotAll) flag for regular expressions, providing consistent behavior for these expressions. The feature is intended to address limitations in which the dot (.) in regular expressions does not match line-terminator characters, said author Axel Rauschmeyer, who has focused on JavaScript. The s flag changes that. This flag will operate on an opt-in basis, so existing regular expressions patterns will not be affected.

Async iteractors enable a new class of software to be written, solving new classes of problems, Braniecki said. The capability combines two powerful features added to JavaScript in recent years: asynchronous operations and iterators/generators. Generators and iterators let code be executed lazily while asynchronous operations allow for code that does not block. Combined, these let developers write lazy code that will not block.

There are four other features under strong consideration, which would make it easier to program with JavaScript, Braniecki said. These include:

Regexp (regular expression) look-behind assertions, fixing a shortcoming with lookarounds, which are zero-width assertions that match a string without consuming anything. Currently, lookaround assertions can be used in a forward direction but not a backward direction. With lookbehind assertions, developers would be able to ensure that a pattern is or is not preceded by another; for example, matching a dollar amount without capturing the dollar sign.

Regexp Unicode property escapes, giving developers a better way to access Unicode character properties. Property escapes in the form of \p{…} and \P{…} would be added.

Promise.prototype.finally, for writing cleaner code when a programmer does not does not close a socket or clean up memory. A class of errors would be removed.

Braniecki expects the ECMAScript 2018 features to be implemented in browsers this year. Some already have been implemented.

Braniecki considers ECMAScript 2018 to be a fairly modest release. Next year, he anticipates bigger capabilities for ECMAScript, with conversations being held about asynchronous iterators and extending classes.

[ JavaScript is the most widely deployed language in the world. Whether you're a beginning, intermediate, or advanced JavaScript developer, you'll master new skills with this nine-part course from PluralSight. ]