Dean Landolt wrote:
On Wed, Oct 3, 2012 at 3:47 AM, Jussi Kalliokoski <[email protected] <mailto:[email protected]>> wrote:

    On Wed, Oct 3, 2012 at 10:24 AM, Andreas Rossberg
    <[email protected] <mailto:[email protected]>> wrote:

        On 3 October 2012 05:38, Brendan Eich <[email protected]
        <mailto:[email protected]>> wrote:
        > Which is more important, iterating over holes (preserved if
        possible), or
        > skipping them and therefore spreading array-likes but not
        iterables?

        I, for one, couldn't care less about holes. We shouldn't
        compromise
        any useful feature just for the sake of preserving some array hole
        craziness.


    I agree. Unless there's a sane use case for holes with the spread
    operator, I don't think it makes sense to make compromises because
    of them, especially since we aren't breaking backwards
    compatibility or anything. We can actually make something better here.



I seem to remember an issue re: what to do with infinite iterators (generators)? If that's correct, was there an agreed-upon resolution?

This is just a D.o.S. hazard that engines must defend against with memory and time-based watchdogs. Even if spread considered only array-like types and not iterables first, a huge array or lying proxy could DoS it. Separate concern, dealt with generically.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to