The offset argument is a relic from before Uint8Array and ArrayBuffer types were widespread. Now that those types are widely adopted, users can create typed arrays with built-in offsets, obviating the need for us to support typed arrays. For example...
const arr1 = new Uint8Array(1024);
const arr2 = new Uint8Array(arr1.buffer, 16);
arr2[0] = 123;
console.log(arr1[16]); // <-- "123"
This assumes we commit to Uint8Array for binary uuid types, however. See #755
The
offset
argument is a relic from beforeUint8Array
andArrayBuffer
types were widespread. Now that those types are widely adopted, users can create typed arrays with built-in offsets, obviating the need for us to support typed arrays. For example...This assumes we commit to
Uint8Array
for binary uuid types, however. See #755This would be a breaking change, of course.