71st meeting of Ecma TC39


Stage 4, ready to ship: Promise.allSettled bug Two syntax changes have moved to stage 3, nullish coalescence and optional chaining A lot of discussion around built in modules. No forward movement. Issues with Weakref – it cannot be tested in the current test262 setup. Discussion around how to address this.

Editor Updates


Test 262 report

Test262 is having problems with weak refs. It is difficult to detect problems because all of the browsers have different garbage collectors. We discussed the possibility of adding a GC hook for the tests, but it was discarded. There are also security implications. There was no clear resolution here, but it highlights an issue.

TC53 Liaison Report

The liaison reported a change to the name TC53: EcmaScript Modules for Embedded Systems

This highlights their support for builtin modules. They explicitly voiced their support for split namespaces, which Mozilla opposes.

Accepted normative changes



  • Disallow internal methods returning continue break return
    • Assists formalisation and implementors
  • Disallow BigInt literals for Annex-B non-octal digits
    • Annex B was causing issues with the spec. It was not resolvable so we disable non-octal digits

Discussions


Loosening idempotency requirements for HostImportModuleDynamically to enable retrying failed fetches

  • issue
  • Approved to merge the change

Web built-in module convention guidance from TC39

  • issue
  • issue with built in modules name spacing

Proposals Advanced Stage 4


Promise.allSettled

  • proposal
  • slides
  • Moved to stage 4
  • discussion around Promise.race being aliased to Promise.anySettled

Proposals Advanced Stage 3


Nullish coalescing

  • proposal
  • slides
  • Moved forward to stage 3
  • Uses parens to address issue with conflicts between   and ?? — grammar needs to be rewritten

Optional Chaining for Stage 3

  • proposal
  • slides
  • introduces a?.b a.b?.() a.b?.[x]
  • Approved for stage 3

Proposals Advanced Stage 2 or Stage 1


Iterator Methods Update / Stage 2

  • proposal
  • slides
  • Set of iterator methods to make it easier to work with iterators. Rather than using array.from, these methods are lazy. Example, iter.map(func).take(5)
  • advanced to stage 2

Explicit Resource Management

Promise.any

  • proposal
  • slides
  • The .errors property need not be enumerable.
  • Consensus reached for Stage 2.

Symbol.reverse

  • sample code
  • Moved forward to stage 1
  • Allows creating a reversed iterator, a bit incomplete in its formulation

Dynamic Import Host Adjustment for Stage 1 or 2

  • proposal
  • slides
  • Approved for stage 1
  • Needs more discussion before stage 2

Map#updateOrInsert

Proposals with blocked advancement


Built-In Modules aka JavaScript Standard Library

  • proposal
  • slides
  • introduces a standard library
  • two points of contention:
  • having a unified namespace, or a split one
  • loading from scripts, synchronously
  • issue two was shown to be out of order
  • blocked from advancement to stage 2 on issue 1
  • blocks work on temporal and other standard library work

Dynamic Code Brand Checks for Stage 2

Reduce the amount of implementation-defined behavior in Array.prototype.sort

  • PR
  • slides
  • specifies behavior more fully based on the V8 implementation
  • has consistent behavior with spidermonkey (requires no change)
  • test cases are not substantial enough
  • no advancement

String.prototype.replaceAll

  • proposal
  • slides
  • investigate web compatibility for matchAll behavior, if we can make both global by default
  • go with option 2 now, advancement blocked.

Collection Normalization update

  • slides
  • no advancement, and potentially indefinite blocker
  • potentially withdrawn

Update on function implementation hiding

  • proposal
  • slides
  • mask toString to hide function implementation
  • further investigation needed. Seeking stage 3 at next presentation

Proposals with unclear resolution


Infix Bang

Inconsistency between Array.from and %TypedArray%.from

Casing Conventions

  • slides
  • kebab case or camel case?
  • Recommendation is not made on Option 3 (camelCase).
  • Discussion will be taken offline.