Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: Clarify the layering relationship between ECMA-262 and ECMA-402 #690

Merged
merged 2 commits into from
Jul 21, 2022

Conversation

gibson042
Copy link
Contributor

As discussed on Matrix: https://matrix.to/#/!pGTjbcoTUqwfzHcRaW:matrix.org/$69qLclthEoIpaEgNKrp3TTIQKWRJ7qxgeQo8ablgfS4?via=matrix.org

I've been thinking about Temporal, and would like to be more specific about the relationship between ECMA-262 and ECMA-402 in general. What are your feelings on proposing something formal like the following at the upcoming plenary?

  1. Any behavior specified in ECMA-402 (including circumstances that require throwing an exception) must be valid in an ECMA-262 implementation that does not support ECMA-402, allowing any ECMA-262 implementation to adopt it incrementally.
  2. ECMA-402 must not prohibit any behavior that is specified in ECMA-262 as available to implementations other than introduction of new built-in values and use of reserved function parameters, allowing any ECMA-262 implementation to adopt it without introducing backwards incompatibility.

@gibson042 gibson042 requested a review from ryzokuken June 3, 2022 23:06
@@ -1,7 +1,7 @@
<emu-clause id="conformance">
<h1>Conformance</h1>
<p>
A conforming implementation of the ECMAScript 2023 Internationalization API Specification must conform to the ECMAScript 2023 Language Specification (ECMA-262 14<sup>th</sup> Edition, or successor), and must provide and support all the objects, properties, functions, and program semantics described in this specification.
A conforming implementation of the ECMAScript 2023 Internationalization API Specification must conform to the ECMAScript 2023 Language Specification (ECMA-262 14<sup>th</sup> Edition, or successor), and must provide and support all the objects, properties, functions, and program semantics described in this specification. Nothing permitted by this specification is prohibited by ECMA-262 to an implementation that does not conform with this specification.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wording is a bit confusing. can you help me understand what it's trying to say?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That ECMA-402 does not grant powers otherwise unavailable to an ECMA-262 implementation. An example violation is tc39/proposal-temporal#2192 , which observes that an ECMA-262 implementation will be required to throw on Temporal.Calendar.from("gregory") unless it also implements ECMA-402.

spec/overview.html Outdated Show resolved Hide resolved
@sffc
Copy link
Contributor

sffc commented Jun 17, 2022

@littledan
Copy link
Member

It looks like this PR is talking about the evolution of the ECMA-402 specification, but it's mixed into a section which is about conformance of implementations. I'd suggest that it'd be more clear if broken out into a separate section with more clear scope.

@ljharb
Copy link
Member

ljharb commented Jul 19, 2022

changes LGTM

@gibson042
Copy link
Contributor Author

gibson042 commented Jul 19, 2022

@littledan That's half right... it is not about the evolution of ECMA-402, but rather about the nature of it with respect to ECMA-262 (specifically that it does not grant any capabilities not already left available by 262, nor does it prohibit behavior left available by 262 for objects and functions defined there).

I've tweaked the language accordingly and invite you to take another look.

Copy link
Member

@littledan littledan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot clearer, thanks

@gibson042 gibson042 merged commit d7fe9a2 into tc39:master Jul 21, 2022
@sffc
Copy link
Contributor

sffc commented Jul 21, 2022

TG1 consensus was achieved on 2022-07-21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants