-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
has-consensusHas consensus and ready to implementHas consensus and ready to implement
Description
From #7: It's interesting to see the case conventions of halfEven
instead of half-even
. This matches our recent decisions. Unfortunately, now we're getting into an area where this convention potentially "infects" or conflicts with the other convention, where it would be half-even
: I was hoping that Decimal would use rounding modes that match Intl. Do we want to extend the camelCase string convention here?
Metadata
Metadata
Assignees
Labels
has-consensusHas consensus and ready to implementHas consensus and ready to implement
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
sffc commentedon Apr 23, 2020
FYI, the style guide documenting the camel case convention is here:
https://github.com/tc39/ecma402/blob/master/docs/style-guide.md
littledan commentedon Apr 23, 2020
Thanks for the cross-reference. I agree that using names like
halfEven
follows our current convention. The implication/interaction with Decimal is the part that I hadn't thought through yet, and what I wanted to discuss in this issue.sffc commentedon Apr 23, 2020
Given the established style in 402, if the Decimal proposal wants compatibility, the easiest thing is to just use the camel case convention in the Decimal proposal. Otherwise, someone could make an argument that kebab case is better than camel case, and then we can consider breaking from the 402 convention in the NumberFormat V3 proposal.
littledan commentedon Apr 27, 2020
I don't know what the right answer is here. I just don't think we had considered a case where compatibility here bled into ECMA-262, so it'd probably be worth some explicit discussion.
sffc commentedon Apr 27, 2020
When we discussed this topic at TC39, I had first proposed that we adopt this style across both 402 and 262, but I got pushback along the lines of "we haven't thought this through enough to make a blanket recommendation for 262". So, instead, I got sign-off from TC39 to adopt this style in 402, with the expectation that it may bleed into 262 at some point in the future, at which point we could discuss it again. That time seems to be now, arriving sooner than I had been expecting. 😉
littledan commentedon Apr 27, 2020
It's sooner than I expected, too. I'm not comfortable with adopting this convention 262-wide.
sffc commentedon Jun 2, 2020
@littledan, are you okay with this proposal proceeding with the camel case names, or would you rather hold this feature back until it's time to put it in the decimal proposal, at which point we could discuss having a different casing convention?
littledan commentedon Jun 9, 2020
Delaying this feature is a pretty complicated question. One factor is, I still owe you more references that led to this feature request (I'm not sure if we've gotten independent requests). At the same time, I don't think we should hold back this feature for decimal's timeline, which seems slower. Overall, I hope rounding modes can match decimal, but I think we could decide ahead of time that we can go back and "harmonize more" as part of a future decimal proposal:
I doubt we'll come up with a mismatch where a name is completely wrong or the semantics are wrong; there isn't much room for bad decisions here.
sffc commentedon Oct 8, 2020
To skirt around this issue, my latest proposed rounding modes in #7 (comment) are one word each. I will close this issue if we have consensus on #7.
sffc commentedon Apr 18, 2021
According to #7, we are moving forward with camel case (halfEven, halfExpand, ...).
Update README.md
Bug 1737500: Return fallback for unsupported values in GetStringOrBoo…
Bug 1737500: Return fallback for unsupported values in GetStringOrBoo…