By which I mean the object that returns the current value and done state?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
No, it must return a new object every time.
See
https://esdiscuss.org/topic/performance-of-iterator-next-as-specified
for the last discussion on this.
Bergi
___
es-discuss mailing list
es-discuss@mozilla.org
On Apr 27, 2015, at 3:29 PM, Tab Atkins Jr. wrote:
On Mon, Apr 27, 2015 at 3:11 PM, John Lenz concavel...@gmail.com wrote:
By which I mean the object that returns the current value and done state?
IIRC, it's not supposed to. The built-in iterators will return fresh
objects each time, so
x = Reflect.construct(Promise, x, C);
is another fine way to fool someone who wrote C.resolve(x) and expected
to get an instance of C back.
Thanks for pointing this out. I believe the ability to use an arbitrary
newTarget parameter for Reflect.construct is breaking the intent of
On Mon, Apr 27, 2015 at 3:11 PM, John Lenz concavel...@gmail.com wrote:
By which I mean the object that returns the current value and done state?
IIRC, it's not supposed to. The built-in iterators will return fresh
objects each time, so there's no mutation hazard. Userland iterators
can of
5 matches
Mail list logo