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

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

The change Cedric suggests seems to me no worse than that changing the
semantics of slice() and does has several benefits, principally that of
enforcing consistency across implementations. I think we should consider it.



On 2011/01/30 21:45, Cedric Vivier wrote:
> 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 and
> 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.
fn:Mark Callow
org:HI Corporation;Middleware Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp, http://www.mascotcapsule.com