W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [WebIDL] Sequences and arrays

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 8 Jul 2009 11:10:41 +1000
To: Giovanni Campagna <scampa.giovanni@gmail.com>
Cc: public-webapps@w3.org
Message-ID: <20090708011041.GC11984@arc.mcc.id.au>
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 ≝ http://mcc.id.au/
Received on Wednesday, 8 July 2009 01:11:32 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:17 UTC