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

CollectionCreateFrrom doesn't need the array-like alternative #3

Closed
allenwb opened this issue Sep 5, 2016 · 1 comment
Closed

CollectionCreateFrrom doesn't need the array-like alternative #3

allenwb opened this issue Sep 5, 2016 · 1 comment

Comments

@allenwb
Copy link
Member

allenwb commented Sep 5, 2016

When the Map and Set constructors were defined TC39 discussed allowing an "array-like" to be passed to them as an alternative to passing an Iterable. But the final conclusion was to not allow that. Map.from and Set.from should probably follow that precedent.

(The reason Array.from does accept an "array-like" was to provide a way to easily convert an "array-like" to an Array. The requirement doesn't seem to necessary for Maps or Sets)

@leobalter
Copy link
Member

It feels incomplete without accepting the array-like, but your feedback on the final conclusion has a higher value here and I don't want to revive this discussion. I removed it.

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

No branches or pull requests

2 participants