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

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 20 Jun 2014 13:24:49 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23369-3890-mcURI6C0xT@http.www.w3.org/Bugs/Public/>

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

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