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

Add Array[Symbol.species] to symbol #2690

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Feb 21, 2025

I'll admit it: this is a bit of a hack.

Like other species keys, this key properly belongs in the array feature. But it we can't put it there just yet.

Because we added the array features early, it's broken down much more finely than other JavaScript collections (and lot of it ought to be combined, when we've dealt with #91). That means this key doesn't fit into very neatly into array or any of the other existing array features.

But it also doesn't make sense as a standalone feature. It's really hard to describe an iffy contrivance as a "feature." I'm not even sure what the pitch is, exactly ("You can make a subclass of Array pretend to be an array"?). It's too weird.

So here I propose parking the key with the symbol feature and cleaning this up more thoroughly later.

@ddbeck ddbeck requested a review from Elchi3 February 21, 2025 18:16
@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Feb 21, 2025
Copy link
Collaborator

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Agree to merge this into a larger array feature at a later stage and happy to hack it into symbol for now.

@Elchi3 Elchi3 merged commit ee30b8f into web-platform-dx:main Feb 27, 2025
4 checks passed
@ddbeck ddbeck deleted the park-array-species branch February 28, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants