[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Typed Array slice() renamed to subset()



On Sat, Jan 29, 2011 at 10:30, Kenneth Russell <kbr@google.com> wrote:
> Additionally, as Gregg has pointed out, using for..in syntax with
> arrays is discouraged in many circles, and I suspect that loop
> optimizations in JavaScript engines will work better with loops
> written using integer indices.

I agree with that and do not promote the usage of for..in, however I
believe TypedArrays implementations should be consistent about this
and consequently more consistent with EcmaScript 5's Arrays as well
which specifically define Array prototype functions and "length"
property are {enumerable:false} (section 15.4.3.1 and 15.4.5.2s).

This will make typed arrays less prone to bugs and undefined behaviors
happening with "fragile" code tested mostly/only with one browser
(which will happen) and also this allows us to reserve some
possibilities for interop with regular arrays in future spec revisions
among other forward-compatibility advantages.

Regards,
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------