[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Typed Array spec nitpicks
On Tue, Apr 13, 2010 at 03:09, Oliver Hunt <email@example.com>
I suspect this is a byproduct of the typed arrays originally being specified inline in the WebGL spec which does specify that everything is initialized.
Speaking of Section 4.1 "WebGLArrayBuffer and Uninitialized Data", is there any drawback specifying one and only one behavior only?
Currently it is worded like this :
"Additionally, the WebGL implementation must ensure that no data outside of the valid byte range for a WebGLArrayBuffer can be accessed. If a caller attempts to access any data outside of that range, an implementation may choose to raise an exception, use the closest valid index, use 0, or any other approach that prevents it from providing access to uninitialized data."
then in 220.127.116.11 :
"get(index) Return the element at the given index. If the index is out of range, an exception is raised."
I think the current wording is inconsistent, which makes the behavior of "array[array.length+1]" ambiguous/undefined and could cause problems with apps "mysteriously" working on one WebGL implementation but not on another (difference between using closest valid index and using zero might be subtle and difficult to debug/detect).