Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Review notes #22

Closed
anba opened this issue May 10, 2021 · 5 comments
Closed

Review notes #22

anba opened this issue May 10, 2021 · 5 comments

Comments

@anba
Copy link
Collaborator

anba commented May 10, 2021

I did make a quick review of the proposal. Below are my notes:


  1. "the functionality of the constructed objects" term is unclear:
  • The term was copied from https://tc39.es/ecma402/#sec-internal-slots, where "constructed objects" refers to the objects created by the constructors listed in that section.
  • But when the term is used in the newly added sections, there aren't any constructors which it can refer to, which makes "constructed objects" unclear.

Possible solution:

  • Maybe explicitly list the constructors which apply to the relevant sections?
    • For example currency codes only apply to Intl.NumberFormat and Intl.DisplayNames objects. But this approach doesn't seem too elegant.
  1. "abstract operation return a List"
  • Every occurence of "abstract operation return a List" should instead read "abstract operation returns a List", i.e. "returns" instead of "return".
  1. AvailableCurrencies ( )
  • "unique well-formed" doesn't make clear in which case the returned currencies are.
  • For example both "usd" and "USD" are well-formed according to IsWellFormedCurrencyCode().
  1. AvailableTimeZones ( region )
  • Add Oxford comma in "the unique, canonical and case-regularized form" -> "the unique, canonical, and case-regularized form".
  1. AvailableTimeZones ( region )
  • "If the region is undefined, then it return all the names." could be misread that it doesn't require the result to contain only unique, canonical, and case-regularised names.

We could provide a complete algorithm to make this case more clear:

  1. Let names be a List of all Zone and Link names of the IANA Time Zone Database.
  2. Let result be a new empty List.
  3. For each element name of names, do
  4. Assert: ! IsValidTimeZoneName(name) is true.
  5. Let canonical be ! CanonicalizeTimeZoneName(name).
  6. Append canonical to the end of result.
  7. Sort result in simple lexicographic order.
  8. Return result with all duplicate elements removed.
  1. AvailableTimeZones ( region )
    (split the content of item 6 to Remove region option for timeZone #24)

  2. AvailableUnits ( ) and AvailableNumberingSystems ( )

  • Spelling mistakes around singular/plural terms throughout these sections, possibly in more places.
  1. Numbering System Identifiers
  • "Unicode Technical Standard #35, Part 3, Section 1" should be link to the relevant UTS section.
  • Also all other references to UTS should be linkified.

(split the content of item 9 and 10 to #24)

  1. Intl.supportedValuesOf ( key [ , options ]) ... see Remove region option for timeZone #24

  2. Intl.supportedValuesOf ( key [ , options ]) ... see Remove region option for timeZone #24

  3. Intl.supportedValuesOf ( key [ , options ])

  • Missing full stop in the final step.
  1. CreateSupportedValuesIterator ( list )
  • The abstract operation should get into its own section and shouldn't be part of "Function Properties of the Intl Object"
  • Either make it a subsection of Intl.supportedValuesOf(...) or add a new sub-section named "Abstract Operations for Intl" under "The Intl Object".

( Move the content of the item 13 and 14 to #23 )
13. CreateSupportedValuesIterator ( list ) ... see #23
14. Intl.supportedValuesOf ( key [ , options ]) ... see #23

@FrankYFTang
Copy link
Collaborator

@anba really appreciate your review. I will split the issue you list here into separate issue so we can discuss with TG2. I will first address some editorial issue first. I think I will change my position to not propose for Stage 3 advancement now until we all agree with

  1. take out region from timeZone or not
  2. change it back to return array or not

FrankYFTang added a commit that referenced this issue May 17, 2021
Fix item 1, 2, 4, 8, 11, and 12
of #22
FrankYFTang added a commit that referenced this issue May 17, 2021
@FrankYFTang
Copy link
Collaborator

I intend to address Item 1, 2, 3, 4, 8, 11, and 12 in #25

@FrankYFTang
Copy link
Collaborator

2. AvailableUnits ( ) and AvailableNumberingSystems ( )

  • Spelling mistakes around singular/plural terms throughout these sections, possibly in more places.

It will be nice if you can suggest a fix for that.

@anba
Copy link
Collaborator Author

anba commented May 18, 2021

It will be nice if you can suggest a fix for that.

Sure. For example there's:

  • "in every rows of Table", which should be "in every row of Table", so singular "row".
  • "identifies numbering system" → "identifies numbering systems", so plural "systems".
  • "identifying the numbering system" → "identifying the numbering systems", also plural "systems".
  • "identifies collation" → "identifies collations", so plural "collations".
  • "identifying the collation" → "identifying the collations", again plural "collations".
  • "identifies calendar" &rarr "identifies calendars", plural "calendars".
  • "identifying the calendar" → "identifying the calendars", plural "calendars".
  • "identifying the currency" → "identifying the currencies", plural "currencies".

@FrankYFTang
Copy link
Collaborator

I believe item 1, 2, 3, 4, 7, 8, 11, and 12 is fixed by #25
split the content of item 6, 9 and 10 to #24
Move the content of the item 13 and 14 to #23

so the only item left is item 5 and let's track it independently in #26

and I will close this issue

@anba- if you see there are anything I missed in the PR 25 or issue 23, 24, 26 please file separated issue so we can address and discuss it independently.

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

No branches or pull requests

2 participants