Skip to content

Commit

Permalink
Added Jack-Works as co-champion, and link to prior proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
erights authored Oct 8, 2024
1 parent 5bcc6d2 commit 338c634
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ A TC39 proposal for immutable ArrayBuffers.

**Stage**: 0

**Champion**: Mark S. Miller (@erights), Peter Hoddie (@phoddie), Richard Gibson (@gibson042)
**Champions**:
- Mark S. Miller (@erights)
- Peter Hoddie (@phoddie)
- Richard Gibson (@gibson042)
- Jack-Works (@Jack-Works)

**Specification**: https://papers.agoric.com/tc39-proposal-immutable-arraybuffer/

Expand Down Expand Up @@ -40,6 +44,10 @@ APIs that accept ArrayBuffers and/or objects backed by them could also benefit f

The [OCapN](https://ocapn.org/) network protocol treats strings and byte-arrays as distinct forms of bulk data to be transmitted by copy. At JavaScript endpoints speaking OCapN such as [@endo/pass-style](https://www.npmjs.com/package/@endo/pass-style) + [@endo/marshal](https://www.npmjs.com/package/@endo/marshal), JavaScript strings represent OCapN strings. The immutability of strings in the JavaScript language reflects their by-copy nature in the protocol. Likewise, to reflect an OCapN byte-array well into the JavaScript language, an immutable container of bulk binary data is required. There currently are none, but an Immutable `ArrayBuffer` would provide exactly the necessary low-level machinery.

## Prior proposals with overlapping goals

[Limited ArrayBuffer](https://github.com/tc39/proposal-limited-arraybuffer)

## Solution

This proposal introduces additional methods and read-only accessor properties to `ArrayBuffer.prototype` that fit naturally into those explained above. Just as a buffer can be resizable or not, and detached or not, this proposal enables buffers to be immutable or not. Just as `transferToFixedSize` moves the contents of a original buffer into a newly created non-resizable buffer, this proposal provides a transfer operation that moves the contents of an original original buffer into a newly created immutable buffer. Altogether, this proposal only adds to `ArrayBuffer.prototype` one method
Expand Down

0 comments on commit 338c634

Please sign in to comment.