Looking to the AI future
This was the second update to ECMAScript, updates that are to follow a new, yearly cadence, and it’s a big departure from previous update cycles. The standard went for years at a time without many updates at all, and would then get a massive upgrade at once, in part due to divisions within the TC39 standards group that oversees ECMAScript.
Now, things are on a more even keel, says Allen Wirfs-Brock. A design expert, Wirfs-Brock has represented both Microsoft and the Mozilla Foundation on comms standards body Ecma International’s TC39 group in the past. He was also project editor for the last huge update to ECMAScript in 2015, originally called ECMAScript 6.
Since the release schedule became more regular, the team also changed the version numbers, renaming ECMAScript 6 to ECMAScript 2015 (ES2015). That major revision turned ECMAScript into a more general purpose programming language, ballooning the specification document from 250 pages to around 600.
“We knew there’d be bugs. We knew there’d be things we wanted to get into it that we simply didn’t have done in time, and so we made the commitment that for the foreseeable future we’d try to do yearly updates where we fix bugs and introduce a small number of features,” Wirfs-Brock told The Reg in an interview.
It’s had a long and torrid history since the first version was published in 1997.
“ JavaSript developed at Netscape and cloned into IE,” explains Wirfs-Brock. Microsoft’s own version of the language was called JScript. As the language made its way into more than one browser, it became clear that everyone would need to be in lockstep when designing new features into the language. “That led to the need for a standardization process.”
In 1996, Netscape delivered the language to standards body Ecma International, which created the specification called ECMA-262 that TC39 oversees.
TC39 published version 3 of ECMA-262 in 1999, and then guided it through some troubled years when infighting between different factions slowed down development of the standard.
Netscape and its supporters wanted version 4 to be a more functionally rich, general purpose language but another faction, including Wirfs-Brock, wanted a less adventurous incremental release.
By mid-2008, the two sides had resolved their issues, setting aside the 4.0 concepts and folding the 3.1 ones into a version 5.0, released in 2009. From there, TC39 made incremental developments to under the informal name EcmaScript Harmony, headed by Wirfs-Brock as project editor.
The group released this version in 2015, featuring improvements including strict mode that provided ways to lock down parts of the system against attack. Then ECMAScript 2016 was finalized in June last year, kicking off the new, yearly release cadence. Right on schedule, Ecma ratified ECMAScript 2017 (ES2017) on June 27.
ES2016 had some minor feature changes and some bug fixes. ES2017 isn’t a bombshell release like 2015 either, but it does have some goodies. “It has a couple of major features, and a handful of minor features, and a couple of bug features,” said Wirfs-Brock.
The first major feature is asynchronous function support. Browser environments work different from classic desktop environments, in that all I/O happens synchronously via callbacks, where the programmer passes a function to an API.
ES2016 formalised that into "promises", an abstraction for managing callbacks. ES2017’s asynchronous function support offers programmers a syntax for promise-returning functions.
“In 2017, we added language mechanisms that let a programmer call a function and asynchronously delay or wait for that function to complete,” Wirfs-Brock explains. That makes it easier to program around responses with time delays.
Shared memory works in conjunction with atomics, providing a new memory model that lets multiple agents work as part of a single program. The atomics functions order their calls sequentially in the shared memory model.
“It actually may make programming more complicated,” said Wirfs-Brock, explaining that you must now co-ordinate the activities between two processes. “But it can make it faster because now those two workers can execute in parallel on multiple cores.”
What’s next for ECMAScript? It has evolved into the general-purpose programming language that advocates originally envisioned, opening up opportunities in other areas. In some cases it’s even being used for artificial intelligence, although not to the same extent as Python.
That’s the biggest difference that he has seen in TC39 and its surrounding discussions: there are more people involved as the language’s scope has grown.
The core of ES2015 was created by a handful of people, with around ten at the core and 15-20 showing up at committee meetings. Now, there are over 50 people at those meetings. That will eventually shoot up to 100, he predicts.
ES2016, 17 and 18 have been about fleshing out small details that didn’t get done for ES2015. That won’t last forever.
“We can go on for a few more years with simple extensions, but at some point pretty soon, the process going forward will have to be figured out,” he concluded.
“It will probably be a new generation of people. It will be put together with much more scrutiny and visibility in the world, because it’s such an important piece of technology.” ®