W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: sequence and iterables

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 15 Nov 2013 21:47:43 -0500
Message-ID: <5286DCCF.10005@mit.edu>
To: Jonas Sicking <jonas@sicking.cc>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, Anne van Kesteren <annevk@annevk.nl>
On 11/15/13 9:32 PM, Jonas Sicking wrote:
> These two are only distinguishable from outside of 'f' if doStuff
> synchronously calls back into "external code".

More precisely, if doStuff has any synchronous side-effects the caller 
can detect.

And there are some complications if there are arguments that come after 
the iterable; webidl right now would say you snapshot before you coerce 
those.

> There are several APIs in ES5/ES6 which does do this. Array.map would
> be an obvious example. And for those APIs I believe they explicitly
> define that no snapshotting happens.

Indeed.

> However in the DOM I think we have very few APIs that synchronously
> call back out to external code while using an array-like.

The proposed spec for Promise.all is what prompted my mail.

That said, you seem to be right; in the DOM and HTML specs as of today 
there seem to be no uses of sequence where the difference would be 
observable....  So maybe I shouldn't worry about it.

-Boris
Received on Saturday, 16 November 2013 02:48:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC