W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: Arrays in WebIDL aren't making sense to me so far

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 03 Apr 2012 10:33:13 -0400
Message-ID: <4F7B0A29.1050209@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 4/2/12 8:38 PM, Cameron McCormack wrote:
> Boris Zbarsky:
>>> var a1 = myB.range(1, 5);
>>> assert(a1[0] == 1);
>>> myB.incrementAll(a);
>> This would create a copy of "a" and pass that to myB, as currently
>> specced.
> Ah, that is definitely a bug. The conversion steps in #es-array need to
> check if the ECMAScript value is a reference to a platform array object
> of the right type first, and just return that if it is.

That would make a lot more sense, yes.  You need an actual bug report, 
or is this thread, enough?

I think that works.  In practice, having different types for "array that 
you might have to hand back sometime" (which would require creation of 
an actual platform array object) and "array that you just need to hold 
on to" (which doesn't really) would be nice for my purposes, but I might 
be able to fake it with annotations in IDL.

Received on Tuesday, 3 April 2012 15:19:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:06 UTC