Just pointing out another advantage: a number of web APIs take buffers, and because they need to worry about destructive writes, they are forced to copy the contents of the underlying buffer. Such APIs could be updated to check the immutable bit and skip the copy if so.
The same for userland APIs which take ArrayBuffers as well, of course, though I think they often simply tell consumers it's their responsibility not to mutate the buffer while the API is working rather than pessimistically copying.
(Some commentary on a different possible fix here.)
Just pointing out another advantage: a number of web APIs take buffers, and because they need to worry about destructive writes, they are forced to copy the contents of the underlying buffer. Such APIs could be updated to check the immutable bit and skip the copy if so.
The same for userland APIs which take ArrayBuffers as well, of course, though I think they often simply tell consumers it's their responsibility not to mutate the buffer while the API is working rather than pessimistically copying.
(Some commentary on a different possible fix here.)