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

Re: How to correctly spec sequences requiring an iterable

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 18 Nov 2013 10:44:57 -0800
Message-ID: <CAAWBYDBJeRvh705JhKk9rf8z+B98DSDvZB8ReVAjkoUCxaqEkA@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Mon, Nov 18, 2013 at 10:37 AM, Domenic Denicola
<domenic@domenicdenicola.com> wrote:
> I still think only doing one iteration would be more idiomatic, but of course this thread has been debating that back and forth and it sounds like you landed on two iterations, so, shrug.

Right; as raised in this thread, doing a single iteration means that
your side effects are observable and potentially weird, as the
iterator callback is running in the middle of assignment.  It requires
carefully-written prose for each instance of the pattern if you want
interoperability.

Doing two loops avoids any mid-conversion observation, and Just Works
as a generic pattern without spec authors having to be extra careful
to line things up right.

~TJ
Received on Monday, 18 November 2013 18:45:44 UTC

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