JS: ECMAScript 2027

By Xah Lee. Date: .
xtodo

Float16Array

xtodo

ai answer

ECMAScript 2027 (ES2027 / the 18th edition) is the current draft of the JavaScript language standard (as of the July 2026 draft at https://tc39.es/ecma262/ ). It builds on ES2026 and includes proposals that have reached Stage 4.

The major new features (from the finished proposals list) are:

1. Temporal (the big one)

A modern, immutable replacement for the infamous Date object.
It provides a clean API for dates, times, time zones, calendars, durations, and instants with nanosecond precision.

Key types (under the global Temporal namespace):

Example:

const birthday = Temporal.PlainDate.from("1990-05-15");
const today = Temporal.Now.plainDateISO();
const age = today.since(birthday).years; // clean duration math

It has already shipped in Firefox 139+, Chrome 144+, Node.js 26+, and more. Polyfills are available if needed.

2. Explicit Resource Management (using / await using)

C#-style deterministic cleanup for resources (files, locks, connections, etc.).

Example:

{
  using file = await openFile("data.txt");
  // use file...
} // file is automatically disposed here (even on early return or throw)

This replaces messy nested try/finally blocks and is already widely supported in modern engines and TypeScript.

3. Joint Iteration (Iterator.zip / Iterator.zipKeyed)

Synchronizes multiple iterators (the classic “zip” operation).

// Zip into arrays
Iterator.zip([
  [0, 1, 2],
  ["a", "b", "c"]
]).toArray();
// → [[0, "a"], [1, "b"], [2, "c"]]

// Zip into objects
Iterator.zipKeyed({
  id: [1, 2, 3],
  name: ["Alice", "Bob", "Carol"]
}).toArray();
// → [{id:1, name:"Alice"}, {id:2, name:"Bob"}, ...]

Supports modes: "shortest" (default), "longest" (with optional padding), and "strict".

4. Atomics.pause()

A micro-wait / spin-hint for efficient lock implementations and busy-wait loops (especially useful for WebAssembly/Emscripten and shared-memory code).
It yields CPU resources without blocking the thread (safe on the main thread).


Quick Context

The official living draft is always at https://tc39.es/ecma262/ . The yearly snapshot is typically finalized around June.

JavaScript. ECMAScript New Features