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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23682

--- 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