Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove @@species lookup from Promise.all() and Promise.race() #151
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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
|
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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).
|
@zloirock It would be consistent with, e.g., |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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 |
This was referenced Nov 4, 2015
bterlson
added
the
needs consensus
label
Nov 9, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
Nov 18, 2015
Member
We are going to remove @@species from promise.all and promise.race. PR's accepted!
|
We are going to remove @@species from promise.all and promise.race. PR's accepted! |
bterlson
removed
the
needs consensus
label
Nov 18, 2015
ljharb
referenced this issue
Nov 18, 2015
Closed
Remove @@species from Promise.all/Promise.race #374
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cscott
Nov 18, 2015
In particular, the wording in https://esdiscuss.org/topic/resolve-reject-on-promise-subclasses-and-species#content-5
cscott
commented
Nov 18, 2015
|
In particular, the wording in https://esdiscuss.org/topic/resolve-reject-on-promise-subclasses-and-species#content-5 |
claudepache commentedNov 3, 2015
See https://esdiscuss.org/topic/resolve-reject-on-promise-subclasses-and-species