April 10 2014 Meeting Notes

Mark S. Miller erights at google.com
Sat Apr 26 15:09:21 PDT 2014

On Sat, Apr 26, 2014 at 2:52 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Mark S. Miller wrote:
>> Regarding the points:
>> #1 yes, we cannot provide one that's reliable, so let's not claim that it
>> is reliable.
> Indeed it is not safe, even excluding yield, to assume finallys run in
> browser contexts, unless you can prove termination of trys (which is hard,
> right? Halting problem and all that).
>  #2 yes it does. I acknowledge that this is a genuine cost.
> I think I can make your case stronger: without |return| one cannot be sure
> a generator iterator |it| parked at a yield won't resume some time later.
> To ensure that it is really "done", call it.return(). Might this be
> important for reasoning about security?


> BTW, return() should be idempotent. Is it?

Since .return takes an argument whose value is observable, I think not.

Hmmm. This is interestingly similar to multiple calls to resolve.

>  #3 for those rare cases where it is inappropriate, like this example,
>> better not to use a for/of anyway to make the unusualness of this code's
>> purpose more explicit.
> Definitely -- given the implicit @@iterator call from (among other places)
> for-of constructs, it's best with for-of loops to avoid any reuse of the
> iterator later. Such hinky multi-loop consumption of a single iterator
> should be considered bad style. One can still do it, of course.
> /be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140426/f6dc6747/attachment.html>

More information about the es-discuss mailing list