Re: [WebIDL] Sequences and arrays

Giovanni Campagna:
> Only one comment:
> it should be noted that with
> interface Example {
> sequence<long> numbers;
> }
> In EcmaScript ex.numbers != ex.numbers, because each access to
> "numbers" creates a new Array
> This is probably counterintuitive to most users of the interface and
> may prevent many uses of sequence<> as attributes (to avoid such
> confusion).

Yes that’s a good point.  I’ve added such a note:

pointed it out in the ECMAScript sequence example:

and added the concept of a “read only” array:

In the added note I suggest to use read only arrays instead of sequences
for attribute types.



Cameron McCormack ≝

Received on Wednesday, 8 July 2009 01:11:32 UTC