On Sat, Mar 22, 2008 at 9:01 AM, John Resig <[EMAIL PROTECTED]> wrote:
> Hello all -
>

>  It seems like there could be a couple solutions:

Objects that are not capable of running in an Array-generic should not
be attempted to run.

Would it make sense to use - like - for all the Array generics? Is
there an Iterable interface?

Array generic methods will be safer if they check their args and throw
an error - InvalidArgumentError, TypeError, UnlikeError - (whatever).

Invalid: (this will crash Firefox with endless loop):-
Array.forEach( { length : -1, "0": 12 }, iter );

function iter(a) {
  console.log( a );
}

Garrett

>
>  --John
>  _______________________________________________
>  Es4-discuss mailing list
>  [email protected]
>  https://mail.mozilla.org/listinfo/es4-discuss
>
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to