RESOLVED FIXED53618
Rename Typed Array subset to subarray
https://bugs.webkit.org/show_bug.cgi?id=53618
Summary Rename Typed Array subset to subarray
Kenneth Russell
Reported 2011-02-02 12:32:56 PST
After discussion with Mozilla about the recent renaming of the Typed Array classes' slice method to subset, they strongly preferred the name "subarray" and we agreed to change the name to that. Need to once again update the WebKit implementation; this will be the last such renaming.
Attachments
Patch (49.87 KB, patch)
2011-02-02 13:22 PST, Kenneth Russell
jamesr: review+
kbr: commit-queue-
Kenneth Russell
Comment 1 2011-02-02 13:22:35 PST
Kenneth Russell
Comment 2 2011-02-02 13:37:19 PST
WebKit Review Bot
Comment 3 2011-02-02 15:47:03 PST
http://trac.webkit.org/changeset/77412 might have broken GTK Linux 32-bit Release The following tests are not passing: editing/selection/find-yensign-and-backslash.html http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html
Chris Marrin
Comment 4 2011-02-02 17:35:08 PST
(In reply to comment #0) > After discussion with Mozilla about the recent renaming of the Typed Array classes' slice method to subset, they strongly preferred the name "subarray" and we agreed to change the name to that. Need to once again update the WebKit implementation; this will be the last such renaming. When was this decided? I don't see any traffic in the WebGL list about this. Is there some list where Typed Array is being discussed that I have not seen? I think the name subarray is no more clear than subset, especially given that it's not a word that appears in the dictionary. It would be much better if we could discuss this before committing the change. I'm not even sure the concept of creating a view that is the subset of another view into the same ArrayBuffer is needed. A "subarray" function could be written in JavaScript, since each Typed Array exposes its buffer, byteOffset and byteLength. And with BYTES_PER_ELEMENT you could write one such function that worked for all types. A more useful function might be one that can actually slice out a part of an ArrayBuffer into a new Typed Array backed by a new ArrayBuffer. But doing such a thing would need to be able to do a scatter/gather operation on interleaved arrays to be really useful. And since I don't think we're prepared to do anything that major at this point, I think it would be better to just avoid any functions like this for this release.
Kenneth Russell
Comment 5 2011-02-03 12:09:06 PST
(In reply to comment #4) > When was this decided? I don't see any traffic in the WebGL list about this. Is there some list where Typed Array is being discussed that I have not seen? Apologies -- this discussion happened in a hurry on the Mozilla bug where they were renaming slice() to subset(): https://bugzilla.mozilla.org/show_bug.cgi?id=630117 . The TC39 members' arguments to using a different name than subset() seemed reasonable, and since we'd just gone through one renaming it seemed like we should quickly rename it to something that everyone was reasonably happy with. Both the Typed Array spec editors (Vlad and me) were in agreement. You and I've discussed this in more depth on the WebGL conference call today, and Vlad already apologized to all developers on the public WebGL list, so hopefully we can lay this one to rest and move on to other work :)
Note You need to log in before you can comment on or make changes to this bug.