-
Notifications
You must be signed in to change notification settings - Fork 107
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
ECMA-402 contents should be arranged more consistently #405
Comments
This seems straightforward and it can help prevent errors when merging proposals, implementing the spec, etc. It should be done in a quiet time when there are not other big PRs open. |
…9#405 Placed prototype.resolvedOptions before prototype constructor and [%Symbol.toStringTag%] for all Intl objects
…9#405 Alphabetize .prototype properties
…9#405 Moved AOs previously inside constructor clauses of Intl.DateTimeFormat, Intl.Locale, and Intl.NumberFormat to the Abstract Operations clauses of those Objects.
#923 rearranges the specifications for each Intl object to match the template given by @gibson042. Is there still interest in abstracting away the duplicative constructor code? I'm a big fan of the idea, but given that different Intl Objects have different options reads interspersed through those sections, the most straightforward way to abstract it out would require normative changes to the order of those options reads. |
Yes, I'd still love to see that.
I think we can get pretty far editorially... AFAICT, there's variation only on
...all of which can be parameterized in a common constructor operation. We can also get even further if normative changes are on the table to e.g. snapshot options objects early in construction, which would be great but should wait for completion of the editorial part so we can better assess the impact of such changes. |
Suggested template for Foo functionality:
The biggest differences of this as compared to http://tc39.es/ecma402/ are in the ordering under "Properties of the Intl.Foo Prototype Object" (which currently all go like "constructor", "@@toStringTag", ..., "resolvedOptions") and in pushing abstract operations to be after the references to them (rather than before the Constructor definition as they are now).
It also looks like a great deal of the constructor code could be abstracted:
"localeMatcher"
,"string"
, «"lookup"
,"best fit"
»,"best fit"
).The text was updated successfully, but these errors were encountered: