TC39 meeting, March 31st - April 2nd, 2020


At this meeting, the draft for 2020 was approved. We are now starting work on the 2021 draft. There were a number of upates to proposals at this meeting, and a few proposals were revived – including decorators and pattern matching.

Some quality of life improvements for JavaScript developers proposed for stage 1 at this meeting:

Meanwhile, Logical Assignment reached stage 3.

Finally, the Weakrefs api was further refined, updating the argument passed to the cleaup function from an iterator to a per-item callback.

Need Review:

No new stage 2 proposals this meeting.

Needs implementation:

Needs minor change:

Keep an eye on…

Normative Spec Changes


Generically forbid extensions of all 402 methods

  • Notes
  • PR
  • Summary: Forbidden Extensions has a list of methods which are specified in ECMA-402 instead, but a few are missing; this PR rectifies that.
  • Impact on SM: None, Spec change
  • Outcome: Consensus.

Surrogate pairs in RegExp capture groups

  • Notes
  • PR
  • slides
  • Summary: A spectext bug was identified in how capture groups with special characters are defined in regexp. Using the example of th character 𝒜, the input "x".match(/(?<\ud835\udc9c>.)/u).groups["𝒜"]' and its intended behavior was discussed, whether /(?<\ud835\udc9c>.)/u and /(?<\u{1d49c}>.)/u should be legal.
  • Impact on SM: Minimal, possibly none as this change may be pulled in when we pull in the RegExp engine changes,
  • Outcome: The consensus was to make both /(?<\ud835\udc9c>.)/u and /(?<\u{1d49c}>.)/u legal.

Aligning atomics with wasm: allow it on non-shared ArrayBuffers

  • Notes
  • Proposal Link
  • Slides
  • Summary: Allow atomics to behave in a deterministic way on ArrayBuffers. Atomics.wait still throws on ArrayBuffers. Atomics.notify always returns 0 on ArrayBuffers.
  • Impact on SM: Needs to be implemented,
  • Outcome: Consensus reached.

Make SharedArrayBuffer optional

  • Notes
  • PR
  • Slides
  • Summary: Feature detection code already exists in the wild that conflates SharedArrayBuffer availability with concurrent access. The proposal seeks to avoid breaking backwards compatibility by gating SharedArrayBuffer global availability on COOP (Cross-Origin Opener Policy) and COEP (Cross-Origin Embedder Policy), and by allowing for optionality in the spec for hosts which do not provide concurrent access to SAB objects.
  • Impact on SM: None, this is a spec change.
  • Outcome: Consensus Reached.

Proposals Seeking Advancement to Stage 4


import.meta for stage 4

  • Notes
  • PR
  • Slides
  • Summary: Introduce an object import.meta that can be used by hosts to express host-specific metadata to code evaluating within a module.
  • Impact on SM: None, already implemented,
  • Outcome: Consensus for Stage 4.

Proposals Seeking Advancement to Stage 3


Add support for ‘OptionalChain’.PrivateIdentifier in class features proposals

  • Notes
  • PR
  • Slides
  • Summary: Allow use of Optional Chaining with Private identifiers. Before this proposal o?.c.#f and o?.#f would both throw.
  • Impact on SM: None, private fields are not yet implemented,
  • Outcome: Consensus for: o?.#f still throws if o is a non-null/undefined object and#f is not present.

LogicalAssignment for stage 3

  • Notes
  • proposal
  • slides
  • Summary: Introduce Logical Assignment Operators, ||=. &&=, and ??=. They are short hand for a = a || b etc.
  • Impact on SM: None, already implemented in nightly,
  • Outcome: Consensus for stage 3?

WeakRefs FinalizationRegistry API change

  • Notes
  • PR
  • Slides
  • Summary: Weak references allow developers to reference an object so long as it has not been garbage collected. The update highlighted two changes. The cleanup that is run is no longer an iterator, it is a per item callback. The second was around CleanupSome, a function that allows users to run the cleanup when they decide to, which was seen as contentious.
  • Impact on SM: There may need to be changes to our cleanupSome implementation. Currently working on breaking this out of the weakrefs proposal for further iteration,
  • Outcome: Cleanup is not a per-item callback, CleanupSome was moved to normative optional, allowing the host to determine if it is implemented or not.

Atomics.waitAsync error rejection PR

  • Notes
  • PR
  • Summary: any errors that occur as a result of failed input validation are thrown synchronously. This pr changes it to be handled in DoWait(). This make waitAsync return a wrapped value so it can fail fast.
  • Impact on SM: Needs to be implemented,
  • Outcome: Consensus for wrapped value.

Proposals Seeking Advancement to Stage 2


TypedArray stride parameter for Stage 2

  • Notes
  • Proposal Link
  • Slides
  • Summary: Introduce a stride parameter to TypedArray Views, so that you could slice an array. For example an array of [1, 2, 3, 4, 5, 6], when created with stride of 3 would output [3, 6]. Presented usecase was graphics.
  • Outcome: Did not advance - incomplete solution for the presented use cases. Stride is not as useful without other parameters allowing you to deal with padding in graphics, etc. We also raised performance concerns.

Proposals Seeking Advancement to Stage 1


Number.range and BigInt.range for Stage 1

  • Notes
  • Proposal
  • Slides
  • Summary: Introduce a range method for numbers, for creating an iterator of a set of numbers. for (const i of Number.range(5)) { console.log(i) } // prints 0, 1, 2, 3, 4, 5.
  • Outcome: Consensus for stage 1.

Introducing: this argument reflection functions for stage 1

  • Notes
  • Proposal
  • Slides
  • Summary: Introduce a bool field for all functions thisArgumentExpected, to check outside of the function, and throw if this was not passed to the function.
  • Outcome: Did not advance, several questions on if it was implementable, or if this was a good solution to the problem raised.

Relax hashbang syntax for Stage 1

  • Notes
  • Proposal
  • Slides
  • Summary: Raises the risk that if scripts are concatinated, the #! comment may not be at the top of the file any more, which may break tooling.
  • Outcome: Precedent exists with use strict directive, module exports and others in JavaScript, hashbang is not seen as widely out of line from this. Tools that do this concatination should be aware of the rules around comments in JavaScript. Committee membres do not agree that that concatination should preserve semantics.

Ergonomic brand checks for Private Fields for Stage 1

  • Notes
  • Proposal
  • Slides
  • Summary: introduce a syntax for doing brand checks using private fields, #foo in obj.
  • Outcome: Consensus for stage 1.

Compartments for Stage 1


  • Notes
  • Proposal
  • Summary: Introduce Compartment for javascript as a way to virtualize host actions, for use cases such as testing and tooling. Unlike Realms, a Compartment shares intrinsics with its host.
  • Outcome: Consensus for stage 1.

Intl.NumberFormat v3 for Stage 1


  • Notes
  • proposal
  • slides
  • Summary: Introduce an api for formatting numbers, for example a money ammount expressed as 1000.00 becomes 1,000.00 for dollars, 1.000,00 for euros.
  • Outcome: Consensus for stage 1.

Updates on Ongoing work


Decimal update

  • Notes
  • Proposal
  • Slides
  • Summary: Research usecases for precision decimal numbers in JavaScript. Currently primary use case is finance. Ongoing survey.
  • Outcome: Discussions around the argument for BigInt to be a one-off, how this interacts with operator overloading, historical decisions around operator overloading.

Pattern Matching Update

  • Notes
  • Proposal
  • Summary: Seeking new champion.
  • Outcome: Several committee members expressed interest

Record and Tuple Update

  • Notes
  • Proposal
  • Slides
  • Summary: Record and tuple introduce new value types that are deeply immutable to JavaScript. The update focused on the syntax (#{, #[), and introduced RefCollections – a stage 0 proposal – as a way to keep value references to objects through symbols.

Temporal update

  • Notes
  • Proposal
  • Slides
  • Summary: Temporal is an imporved Date and time object for JavaScript. The update focused on the problem of calendars, which are difficult to define fully. The change allows users to define custom calendars.

Decorators update / Call for participation