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 @@species lookup from Promise.all() and Promise.race() #151

Closed
claudepache opened this Issue Nov 3, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@zloirock

This comment has been minimized.

Show comment
Hide comment
@zloirock

zloirock Nov 3, 2015

@@species from Promise.resolve and Promise.reject was removed after this issue. Will be strange also remove it from Promise.all and Promise.race, but leave it in Promise#then / Promise#catch.

zloirock commented Nov 3, 2015

@@species from Promise.resolve and Promise.reject was removed after this issue. Will be strange also remove it from Promise.all and Promise.race, but leave it in Promise#then / Promise#catch.

@claudepache

This comment has been minimized.

Show comment
Hide comment
@claudepache

claudepache Nov 3, 2015

Contributor

@zloirock It would be consistent with, e.g., Array.from, etc. (static method, explicit constructor, no @@species lookup) vs. Array#slice, etc. (instance method, implicit constructor, @@species lookup).

Contributor

claudepache commented Nov 3, 2015

@zloirock It would be consistent with, e.g., Array.from, etc. (static method, explicit constructor, no @@species lookup) vs. Array#slice, etc. (instance method, implicit constructor, @@species lookup).

@zloirock

This comment has been minimized.

Show comment
Hide comment
@zloirock

zloirock Nov 3, 2015

@claudepache it will be consistent, but only for me this approach seems strange? For prototype methods - new this.constructor[@@species], for statics - instead of new this[@@species] just new this. In this case, it would be logical to store @@species on prototype.

zloirock commented Nov 3, 2015

@claudepache it will be consistent, but only for me this approach seems strange? For prototype methods - new this.constructor[@@species], for statics - instead of new this[@@species] just new this. In this case, it would be logical to store @@species on prototype.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Nov 18, 2015

Member

We are going to remove @@species from promise.all and promise.race. PR's accepted!

Member

bterlson commented Nov 18, 2015

We are going to remove @@species from promise.all and promise.race. PR's accepted!

@cscott

This comment has been minimized.

Show comment
Hide comment
@cscott

cscott Nov 18, 2015

Um, we need an exact spec. There are two different uses of species in promise.all/race, as I described in the thread above. I made a proposal for how the two uses should be resolved; are you adopting my wording?

cscott commented Nov 18, 2015

Um, we need an exact spec. There are two different uses of species in promise.all/race, as I described in the thread above. I made a proposal for how the two uses should be resolved; are you adopting my wording?

@cscott

This comment has been minimized.

Show comment
Hide comment

domenic added a commit that referenced this issue Nov 21, 2015

Normative: Remove use of @@species from Promise.all/race
Fixes #151, per November 2015 TC39 meeting.

@domenic domenic closed this in 3b582af Nov 21, 2015

ljharb added a commit to paulmillr/es6-shim that referenced this issue Nov 29, 2015

anba added a commit to anba/test262 that referenced this issue Dec 2, 2015

Updates for ES2016 Draft 2015-12-01
- RegExp.prototype[Symbol.split] calls ToUint32 (tc39/ecma262#92)
- Species lookup removed from Promise.all and Promise.race (tc39/ecma262#151)
- Generator functions are no longer constructors (tc39/ecma262#171)

Fixes tc39#444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment