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: Start all fields and slots with an uppercase code point #81

Open
caridy opened this issue Feb 27, 2016 · 11 comments
Open

Editorial: Start all fields and slots with an uppercase code point #81

caridy opened this issue Feb 27, 2016 · 11 comments
Labels
c: spec Component: spec editorial issues editorial Involves an editorial fix s: help wanted Status: help wanted; needs proposal champion
Milestone

Comments

@caridy
Copy link
Contributor

caridy commented Feb 27, 2016

In order to align with 262 on this, we will have to refactor part of the spec due to the following:

As an extension to the Record Specification Type, the notation "[[<name>]]" denotes a field whose name is given by the variable name, which must have a String value. For example, if a variable s has the value "a", then [[<s>]] denotes the field [[<a>]].

For ECMAScript objects, this standard may use variable-named internal slots: The notation "[[<name>]]" denotes an internal slot whose name is given by the variable name, which must have a String value. For example, if a variable s has the value "a", then [[<s>]] denotes the [[<a>]] internal slot.

This is very tricky, but worth the effort IMO. I might delay this work until after 3rd edition because formatToParts will change the way we transform the patterns for number and datetime format, which can facilitate this work.

/cc @littledan @bterlson

@caridy caridy added the editorial Involves an editorial fix label Feb 27, 2016
@caridy caridy added this to the 4rd Edition milestone Feb 29, 2016
@littledan
Copy link
Member

If it's a 'procedurally generated' name, then I don't think this rule needs to apply the same way. However, I like the way that formatToParts changes this.

@caridy
Copy link
Contributor Author

caridy commented Mar 9, 2016

yeah, I do have a local branch for this, but lets wait until after formatToParts() lands for 4th edition.

@caridy
Copy link
Contributor Author

caridy commented Aug 10, 2017

hopefully 5th edition.

@caridy
Copy link
Contributor Author

caridy commented Dec 22, 2017

These is related to #56 as well. We are almost there, and lowercase is only used in match resolvers and locale data records as far as I can tell. @anba, @littledan, do you guys think that this is realistic?

@littledan
Copy link
Member

Not sure what you are asking. The change still seems like a good idea to me.

@sffc sffc added c: spec Component: spec editorial issues s: help wanted Status: help wanted; needs proposal champion labels Mar 19, 2019
@spectranaut
Copy link

spectranaut commented Jan 11, 2020

@leobalter @littledan I also wonder if we should keep with issue open. Now that I submitted #401, all the remaining non-capitalized record fields are from constructing records from locale data (for example, in resolveLocale). Maybe it's best to simply allow non-capitalized field names in 402 because of this case.

@littledan
Copy link
Member

@spectranaut I'm glad your patch landed. I agree it wouldn't make sense to capitalize a record field like [[nu]]. However, I don't understand why things like [[locale]], [[dataLocale]] and [[extension]] should be lower case. Was this left that way deliberately?

@sffc
Copy link
Contributor

sffc commented Jun 5, 2020

Related: #339

@sffc sffc added s: help wanted Status: help wanted; needs proposal champion and removed s: help wanted Status: help wanted; needs proposal champion labels Jun 5, 2020
@sffc sffc modified the milestones: 4th Edition, ES 2021 Jun 5, 2020
@sffc sffc modified the milestones: ES 2021, ES 2022 Mar 22, 2021
@sffc sffc modified the milestones: ES 2022, ES 2023 Jun 1, 2022
@ryzokuken
Copy link
Member

@gibson042 this still needs to happen, right?

@gibson042
Copy link
Contributor

I don't feel strongly about it. The lowercase field names don't bother me, especially those that directly correspond with the canonical form of BCP 47 language subtags or Unicode -u- extension keys in e.g. [[AvailableLocales]] and [[RelevantExtensionKeys]]. But I would like to uppercase [[locale]] and [[extension]] field names in locale records (probably renaming at least [[locale]] in the process), [[localeMatcher]]/[[dataLocale]]/etc. in ResolveLocale, and anything else that is not reflecting externally-defined names.

@sffc
Copy link
Contributor

sffc commented Jan 21, 2023

Happy to let the editors decide whether to either fix this issue or close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: spec Component: spec editorial issues editorial Involves an editorial fix s: help wanted Status: help wanted; needs proposal champion
Projects
None yet
6 participants