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 Iterators and the for..of loop #1658

Merged
merged 4 commits into from
Oct 9, 2024
Merged

Conversation

Elchi3
Copy link
Collaborator

@Elchi3 Elchi3 commented Aug 26, 2024

(For Iterator methods, see #1656)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
https://chromestatus.com/feature/4696563918045184

Using compute_from here, as I think the for_of key is the most relevant data point for this one.

There are also iterator symbols on many JS builtins and these could belong to this feature (e.g. javascript.builtins.String.@@iterator and many more). Array has its own feature: https://github.com/web-platform-dx/web-features/blob/main/features/array-iterators.yml. Not sure if this should rather all be here or if we want this to be separate for each builtin.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Aug 26, 2024
features/iterators.yml Outdated Show resolved Hide resolved
features/iterators.yml Outdated Show resolved Hide resolved
@autonome
Copy link
Collaborator

autonome commented Sep 6, 2024

There are also iterator symbols on many JS builtins and these could belong to this feature (e.g. javascript.builtins.String.@@iterator and many more). Array has its own feature: https://github.com/web-platform-dx/web-features/blob/main/features/array-iterators.yml. Not sure if this should rather all be here or if we want this to be separate for each builtin.

I think is good how you've done this as the generic + usage (for...of), and leaving instance-specific iterators w/ their instances.

Spec authors and implementers may think of something like iterableness as group that crosses instances of it, but developers think on the instance/usage level. Eg, imagine you're looking up if something is iterable - developer would go to the something docs for that.

features/iterators.yml Outdated Show resolved Hide resolved
features/iterators.yml Outdated Show resolved Hide resolved
@ddbeck ddbeck dismissed autonome’s stale review October 9, 2024 18:19

Requests complete

@ddbeck ddbeck merged commit 0048f7b into web-platform-dx:main Oct 9, 2024
3 checks passed
@Elchi3 Elchi3 deleted the iterator branch October 9, 2024 20:43
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.

3 participants