tc39/proposal-arraybuffer-base64

Will this also be added to `Uint8ClampedArray`? Should it be?

shgysk8zer0 opened this issue · 1 comments

The title basically say all that is necessary here, but I only just realized that Uint8ClampedArray does not extend Uint8Array, so this will not apply there. I feel that the two should be equivalent except for differences in handling eg 256 and -1. And I could easily see Uint8ClampedArray being better suited for eg color manipulation and toHex()/fromHex() being extremely useful for the simplicity of that.

bakkot commented

No. Uint8ClampedArray is a weird and specialized artifact of history, whereas Uint8Array is the canonical sequence-of-bytes type. It's easy enough to convert between the two for the very small number of people who need that.