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

Editorial: Replace use of privileged language values in GetOption #689

Merged
merged 2 commits into from
Jun 27, 2022

Conversation

gibson042
Copy link
Contributor

cf. #687 (comment)

Use of privileged language values in abstract operation arguments is bad form. The generally preferred alternative is to use spec enum values, but Temporal GetOption currently uses an alternative approach that directly references Types.

I'm not sure which we we want to go here, so I took the Temporal Type-reference approach in the first commit and the conventional ECMA-262 spec-enum-approach in the second for easy adoption of either. I'm interested to hear others' opinions.

Note also that Temporal will move GetOption into ECMA-262, so this is really a question of pre-alignment.

@gibson042 gibson042 added the editorial Involves an editorial fix label Jun 2, 2022
@gibson042 gibson042 requested review from ljharb and ryzokuken June 2, 2022 16:36
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

LGTM, but 262 and 402 editors should weigh in first

@gibson042 gibson042 force-pushed the 2022-06-getoption-special-arguments branch from 456a69f to d57e62e Compare June 7, 2022 14:51
@ljharb ljharb requested review from a team June 7, 2022 15:21
@michaelficarra
Copy link
Member

The spec enums are preferred by the 262 editors. We should use the latter commit, especially if this is making its way into ECMA-262.

@gibson042
Copy link
Contributor Author

@michaelficarra is that @tc39/ecma262-editors approval of this PR in its present state?

@michaelficarra
Copy link
Member

yup, that's a good use of enums

@leobalter
Copy link
Member

LGTM

I don't want to stamp a PR approval as I'm not fully reviewing the contents of ECMA-402 to verify for any missing parts. The diff seems good, thou.

@gibson042 gibson042 merged commit 0ac2e10 into tc39:master Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Involves an editorial fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants