Skip to content

Editorial Changes to Align with 262 #120

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

Merged
merged 3 commits into from
Feb 2, 2017
Merged

Editorial Changes to Align with 262 #120

merged 3 commits into from
Feb 2, 2017

Conversation

caridy
Copy link
Contributor

@caridy caridy commented Jan 12, 2017

  • upgrading ecmarkup
  • clear separation between "internal slots", "record fields" and "key properties", just because they all have the same name does not mean they are the same, or should be the same, this is needed to align with the InternalSlots guidelines from 262
  • rename all internal slots to match 262

This PR does not modify any logic or semantic in any way, and hopefully it will go smooth. Please, take time to review all the details in case I have missed something.

…haracter. this change allows a clear separation between internal slot names and properties/fields used across the spec as in [[<name>]]. This change does not change any semantic or any logic, it only adds internal slot column in table 4 and table 2 to have a clear distintion between property and internal slot names.
…ith uppercase characters. This change does not change any semantic or any logic.
@caridy caridy added the editorial Involves an editorial fix label Jan 12, 2017
@caridy caridy self-assigned this Jan 12, 2017
@caridy
Copy link
Contributor Author

caridy commented Jan 12, 2017

/cc @zbraniecki @ericf

Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm!

The only thing is that I think that ResolveLocale should also return fields with capital first letter if we're switching everything.

1. Set _collator_.[[locale]] to _r_.[[locale]].
1. Let _relevantExtensionKeys_ be %Collator%.[[RelevantExtensionKeys]].
1. Let _r_ be ResolveLocale(%Collator%.[[AvailableLocales]], _requestedLocales_, _opt_, _relevantExtensionKeys_, _localeData_).
1. Set _collator_.[[Locale]] to _r_.[[locale]].
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the field on _r_ also be Locale?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the problem with ResolveLocale is that it creates an arbitrary record with fields, and we use that to match the keys provided via options. We could attempt to do the same, but those are not internal slots, just fields in a record. I think we can keep them like that. I know it is confusing though.

@rwaldron
Copy link
Contributor

👏

1. Let _value_ be _r_.[[&lt;_key_&gt;]].
1. If the name given in the Type column of the row is *"boolean"*, let _value_ be the result of comparing value with *"true"*.
1. Set _collator_.[[&lt;_property_&gt;]] to _value_.
Copy link
Contributor

Choose a reason for hiding this comment

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

So happy to get rid of these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It took some time, and some big refactors, but we are getting there :). Still using it in a couple of places where a record with fields is created and matching some options keys, but it is at least narrowed down to one or two abstracts at the moment.

@rwaldron
Copy link
Contributor

LGTM!

@littledan
Copy link
Member

If you're changing the internal names to upper case, should the resolvedOptions() definition be updated? I don't see an update. Given that there will be a mismatch in the names, maybe the definitions could be rewritten in a more algorithmic style, to explicitly create the object and add the individual properties based on the fields.

@caridy
Copy link
Contributor Author

caridy commented Jan 24, 2017

@littledan I have created a new issue #124 to solve that in a different patch to eliminate the usage of [[<>]] entirely. Are we good to merge this?

@caridy caridy merged commit 2a77f67 into master Feb 2, 2017
@caridy caridy deleted the editorial branch February 2, 2017 19:17
<td>numeric</td>
<td>"boolean"</td>
<td></td>
</tr>
<tr>
<td>kf</td>
<td>[[CaseFirst]]</td>
<td>caseFirst</td>
Copy link
Member

Choose a reason for hiding this comment

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

Editorial suggestion: now that this is just a property name and not also an internal slot, maybe it should be written as "caseFirst" rather than caseFirst.

Copy link
Contributor Author

@caridy caridy Feb 10, 2017

Choose a reason for hiding this comment

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

@littledan this is now fixed: e4eaa72

@littledan
Copy link
Member

Sorry for the slow response, thanks for fixing up all these issues, retroactive LGTM.

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