Re: How to correctly spec sequences requiring an iterable

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