-
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
Editorial: Capitalize field names to match 262 style guide #766
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes the `!` from two AO calls that return regular values not abrupt completions. notes for locale complete notes for [[locale]]
…: this was a spec bug! it had been changed to HourCycle in the list of internal slots, but InitializeDateTimeFormat was still using [[hourCycle]]
…into capitalization
…itivePattern]], [[ZeroPattern]], [[NegativePattern]], [[Unit]], [[Currency]], [[Decimal]], [[UnitDisplay]], [[Code]], [[Symbol]], [[Percent]], [[Narrow]], [[Short]], [[Long]]
…], [[PositivePattern]], [[ZeroPattern]], [[NegativePattern]], [[Unit]], [[Currency]], [[Decimal]], [[UnitDisplay]], [[Code]], [[Symbol]], [[Percent]], [[Narrow]], [[Short]], [[Long]]" This reverts commit 2a7d3cb.
…om previous commit
…ield names in ECMA402 other than 1) the two-letter ones [[nu]] and so forth, and 2) ones that are never directly named in the spec in any way (i.e. the various [[<locale>]] accesses, etc
their PascalCase equivalents. Exceptions: fields with two-character names like [[nu]] and [[co]], fields that are only accessed dynamically, as in [[<locale>]].
…into capitalization
see #770 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #81
I've renamed most (not quite all) of the fields with names in [[camelCase]] to [[PascalCase]] in order to align with 262. As noted in the issue, the thing that makes this tricky is the use of dynamic accesses. The fixes here either removes dynamic accesses when possible to do so relatively elegantly -- for example, if format can only contain "short" or "long":
Set _blah_.[[<format>]] to *"blah"*.
is replaced with:
or for ones with relatively more possible options, tables are used, and when absolutely necessary, dynamic accesses are maintained but with the first character of the values of variables used for dynamic access replaced with its ASCII-uppercase equivalent.
The only all-lowercase field names I've preserved are ones like [[nu]] and [[co]] that we've inherited -- this seems stylistically nonoffensive to me, but it shouldn't be much trouble to change those fields to [[NumberingSystem]] and [[Collation]], etc., though some care will have to be taken to make sure those names aren't already in use.
The style on the whole in this PR is somewhat inconsistent due to me trying to more or less match the style of the surrounding spec in each section, but given the scope of the changes I figured it would be a good idea not to do anything further refactoring until more experienced eyes have been on this.