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

[Bug 12287] Restrict sequence<T> to operation argument types and return types

From: <bugzilla@jessica.w3.org>
Date: Mon, 23 May 2011 21:41:31 +0000
To: public-script-coord@w3.org
Message-Id: <E1QOcsV-000315-IG@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12287

--- Comment #4 from Cameron McCormack <cam@mcc.id.au> 2011-05-23 21:41:30 UTC ---
The undesirable behaviour is that a new Array object would be created every
time you access the property.  Simple looping over a sequence attribute, like

  interface Blah {
    readonly attribute sequence<long> numbers;
  };

  for (var i = 0; i < myBlah.numbers.length; i++) {
    doSomethingWith(myBlah.numbers[i]);
  }

would end up doing a lot of wasted work.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Monday, 23 May 2011 21:41:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC