What’s new in ECMAScript 2018

See the original posting on JavaWorld

ECMAScript, the standard specification underlying JavaScript, is on track for a new release, likely in June.

So far, two proposals have been finalized for inclusion in the ECMAScript 2018 specification. Both are considered as fairly foundational work and not major features, said Zibi Braniecki, a senior software engineer at Mozilla who participates in the development of ECMAScript.

The two proposals include:

  • 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.

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

To read this article in full, please click here