« Bugzilla Issues Index
#2514 — Promise.all() and Promise.race() can't take a "promise for an array"
- bug_id:
2514
- creation_ts:
2014-02-07 15:57:00 -0800
- short_desc:
Promise.all() and Promise.race() can't take a "promise for an array"
- delta_ts:
2014-03-27 09:06:43 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 22: January 20, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
WONTFIX
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
C. Scott Ananian
- assigned_to:
Allen Wirfs-Brock
- cc:
d
- commentid:
7213
- comment_count:
0
- who:
C. Scott Ananian
- bug_when:
2014-02-07 15:57:19 -0800
Most existing promise implementations allow the all/race methods to take a promise of an array, in addition to a direct array. That is, they Promise.cast() their argument. The spec should permit the argument to be a promise of an iterable.
- commentid:
7219
- comment_count:
1
- who:
Domenic Denicola
- bug_when:
2014-02-08 12:16:01 -0800
I don't think we should do this. It adds complexity and an extra event loop tick to the common case. You also have the question of what to do with things that have both a `then` method and an `@@iterator`.
- commentid:
7222
- comment_count:
2
- who:
C. Scott Ananian
- bug_when:
2014-02-08 13:22:06 -0800
I don't feel strongly about this issue.