RE: How to correctly spec sequences requiring an iterable

From: Boris Zbarsky <bzbarsky@MIT.EDU>

> 6) Walk through with IteratorStep/IteratorValue etc, converting each sequence element before stepping to the next one.
>
> Does anyone see any obvious problems with that other than the (controversial) object check in step 1?

Does this step 6 commit implementations to two separate loops, one to convert, and then one to actually do things with the elements? It seems worrying to bake this performance cost into the spec for every sequence-using function. On the other hand, O(2n) = O(n), so maybe not a big deal...

Received on Monday, 18 November 2013 18:06:22 UTC