W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

[Bug 23682] Fix the current [ArrayClass], [] and sequence<T> mess

From: <bugzilla@jessica.w3.org>
Date: Wed, 30 Oct 2013 21:05:40 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23682-3890-fP8hsOlbSC@http.www.w3.org/Bugs/Public/>

--- Comment #4 from Jonas Sicking <jonas@sicking.cc> ---
I agree D is hard. JS simply doesn't provide good primitives to support this.
There's little we can do in the DOM to bridge that shortcoming. At best we
could create some new DOM-API, but that means the DOM going its own way, which
is always sad.

What is hard about B? I don't doubt that it's there, I just don't see it yet :)

Ignoring both IDL syntax and what "array" means, as far as I can tell our
options are:

* Return a "live" array.
* Return a new array each time.
* Return a frozen array, and change what instance is returned when needed.

The first one seems harder to implement, and is less liked by authors.

The second seems bad for perf and bad for attributes.

The third does mean breaking new ground since we're returning frozen objects,
which is something new to the web platform (neither JS nor DOM does this right
now). Breaking new ground is always scary/risky. But if we accept the solution
for A in comment 0, then it's ground that we're already breaking.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 30 October 2013 21:05:41 UTC

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