-
Notifications
You must be signed in to change notification settings - Fork 199
Add Number #1567
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
Add Number #1567
Conversation
|
I'd be surprised if This does mean we have to make more judgment calls about what is a standalone feature, but I think sticking to API shape too closely will lead to web-features resembling an index of reference docs more than caniuse-style features. We've been quite atomistic about HTML elements, but I think even there we have features (like |
That's a fair point. I broke them down based on the Global Objects page from MDN. In that way, we've kept all the "Indexed Collections" as separate features... One alternative might be to do something like primitives, which would include: String, Number, Boolean, and BigInt, plus Object, Function, Error, and Symbol. Though the last four feel a little tacked on. Additionally, we should probably consider adding Date to that list. |
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of having some kind of combined "primitives" feature. These feels like yet another application for #971 or #866.
We don't have the machinery for that yet, however. For now, I'm going to suggest that we put these into a primitive-types group that we can use later to form a composite feature or whatever it is we need to do there.
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
|
@Elchi3 based on our conversation earlier today, do you want to take a look at this? I wondered if you had an opinion on/how whether to slice or combine something so fundamental it's almost invisible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that Math and Number work together (and Math doesn't work with BigInt), I think it is generally fine to think about these two as one feature.
This isn't really analog to how web-features records arrays, but maybe it is also not needed to split things out into historical features when all the features are baseline high anyway.
Some things I would separate out from here, though:
f16roundshould not be part of this, imo. That seems to belong to the float16 feature. See #1530javascript.grammar.numeric_separatorscould deserve it's own feature (although it is also baseline high, so not sure. It is certainly much later [2018 vs 2023], so maybe a guideline could be "split into separate feature when baseline high dates are 5+ years apart).javascript.builtins.Number.toLocaleString.locales_parameterandjavascript.builtins.Number.toLocaleString.options_parameterseem to belong to Intl rather than here. (I'm working on that now)
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the commentary, @Elchi3. That's very helpful. I've left some line-comments to signal my agreement and suggest revisions to the name and description.
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
No description provided.