The ECMAScript 2024 specification includes a new feature for transferring ArrayBuffers and advanced capabilities for working with string sets and constructing promises. Credit: PanuShot/Shutterstock ECMAScript 2024, the latest version of ECMA International’s standard for JavaScript, has been officially approved, with features including transferring ArrayBuffers and advanced capabilities for working with string sets. The ECMAScript 2024 specification, also generally known as ECMA-262, was approved on June 26. Among the features are added facilities for resizing and transferring ArrayBuffers and SharedArrayBuffers. ArrayBuffers have previously enabled in-memory handling of binary data. The new feature extends ArrayBuffer constructors to take an additional maximum length that allows in-place growth and shrinking of buffers. SharedArrayBuffer was also extended to take an additional maximum length that allows in-place growth. Another capability featured in ECMAScript 2024 is the addition of a RegExp/v flag for creating RexExps with more advanced features for working with sets of strings. Also introduced was the Promise.withResolvers convenience method for constructing promises. Promise.withResolvers has been described as a mechanism for managing asynchronous operations. The feature adds a static method, known as withResolvers, to the Promise constructor, which returns a promise along with its resolution and rejection functions conveniently exposed. ECMAScript 2024’s Object.groupBy and Map.groupBy methods, meanwhile, are for aggregating data. And the Atomics.waitAsync method is for asynchronously waiting for a change to shared memory. The capability is primarily for use in agents that are not allowed to block. ECMAScript 2024 also adds the String.prototype.isWellFormed and String.prototype.toWellFormed methods for checking and ensuring that strings contain only well-formed Unicode. In addition to being based on JavaScript, ECMAScript also is based on Microsoft’s JScript, described as a legacy dialect of the ECMAScript standard. Some features that did not make it into ECMAScript 2024 are still contenders for ECMAScript 2025 next year. These include duplicate named capturing groups, for regex capturing groups to be repeated, and new Set methods in JavaScript, to add methods like union and intersection to JavaScript’s built-in Set class. Last year’s ECMAScript 2023 specification offered methods for searching and changing arrays and extended the WeakMap API. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos