[Bug 23369] Provide hooks for Typed Arrays (ArrayBuffer and friends)

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

--- Comment #44 from Domenic Denicola <domenic@domenicdenicola.com> ---
Getting down to the business of solving this bug:

As I see it we have two choices. One, be consistent with sequence<>:

func(sequence<any> x); // copies the iterable into an array
func(ArrayBuffer x); // copies the ArrayBuffer into another ArrayBuffer

func([NoCopy] sequence<any> x); // no copying; spec author must be cautious
func([NoCopy] ArrayBuffer x); // no copying; spec author must be cautious

Or two, be inconsistent, but efficient-by-default:

func(sequence<any> x); // copies
func(ArrayBuffer x); // no copying

func([NoCopy] sequence<any> x); // no copying
func([Copy] ArrayBuffer x); // copies

The third alternative is to try to retroactively change the meaning of
sequence<> to require a [Copy] when it must be copied, but I have a hard time
seeing that as feasible.

In all cases, we will want to write up a good explanation and guidance document
explaining the various concerns; in particular we'd need to give concrete
guidelines on how to use non-copied objects without causing undefined behavior
or other horrible things.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 20 June 2014 13:24:51 UTC