Skip to content

Conversation

@Elchi3
Copy link
Collaborator

@Elchi3 Elchi3 commented Nov 18, 2024

Adding javascript.builtins.Array.@@unscopables and javascript.builtins.Array.@@species to array.

So far the array feature was sort of "pure" and only contained original keys with the same version, but I really don't know where else to sort these two keys. I think if we were to author the array features today, more keys would probably move into the main array feature as they are old enough.

It is unfortunate that web-features doesn't define when such a move into the main feature should happen. I think the project would benefit from having a lintable rule here to avoid being inconsistent. Something like: "If a sub feature is baseline high for more than 3 years, the sub feature should be merged with the main feature." For array, this would mean that features like array-iterators, array-isarray, array-fill, and more would be merged into array, for example. cc @ddbeck

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Nov 18, 2024
@ddbeck
Copy link
Collaborator

ddbeck commented Nov 18, 2024

Symbol.unscopables is a really weird one. I kinda think it belongs with the with statement. The Symbol itself is not deprecated, but it's part of a broader feature that you shouldn't use.

Symbol.species is similar. It looks like it might go away entirely but even if it doesn't it, I think we could advocate for it to be deprecated in the same sense that the with statement is.

In the mean time, we could park these features here with a TODO and an issue saying that we should reevaluate when have sorted out the discouraged status.

@Elchi3
Copy link
Collaborator Author

Elchi3 commented Nov 19, 2024

Thanks Daniel. I'm closing this PR for now. It sounds like we might need to move all the @@species and @@unscopable symbols from existing features to a new feature on its own (and mark that feature as discouraged once we can).

@Elchi3 Elchi3 closed this Nov 19, 2024
@Elchi3 Elchi3 deleted the moar-array branch November 21, 2024 11:25
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