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

Remove subsection on .indexed() #258

Merged
merged 1 commit into from Dec 12, 2022
Merged

Remove subsection on .indexed() #258

merged 1 commit into from Dec 12, 2022

Conversation

rauschma
Copy link
Contributor

@rauschma rauschma commented Dec 9, 2022

IINM, that method was removed from the proposal.

@bergus
Copy link

bergus commented Dec 10, 2022

Can we please add .indexed() back to the proposal instead? There was no good reason for removing it.

@Josh-Cena
Copy link

Josh-Cena commented Dec 10, 2022

See #211

@bergus
Copy link

bergus commented Dec 10, 2022

@Josh-Cena Yes, I saw #211 (comment). But while adding the second argument received "mixed feedback", removing .indexed() received opposition, and there were no arguments brought forward. Or did I miss some TC39 meeting discussion?

@ljharb
Copy link
Member

ljharb commented Dec 10, 2022

@bergus the proposal is now stage 3, as-is, so it's unlikely any changes will be made that aren't motivated by feedback that could only be gleaned from implementation.

As I recall, counter was a replacement for .indexed, and there was opposition to both forms existing.

@michaelficarra
Copy link
Member

@bergus indexed is very easy to reproduce given the counter argument of map, so is far less motivated now. It can always be pursued as a separate proposal, but no longer made sense in this "obvious" initial set.

Iterator.prototype.indexed = function() {
	return this.map((elem, counter) => [counter, elem]);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants