Skip to content

Commit 71d1ce8

Browse files
authored
README: Clean up Q&A (#14)
1 parent 0074833 commit 71d1ce8

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,41 +111,54 @@ Tracking issues to be added:
111111
## Q&A
112112

113113
<dl>
114-
<dt>
114+
<!-- Markdown rendering of HTML blocks requires a blank line before further Markdown content. -->
115115

116-
Why can't an immutable ArrayBuffer be detached/transferred?
117116

117+
<dt>
118+
Why can't an immutable ArrayBuffer be detached/transferred?
118119
</dt>
119120
<dd>
120-
121121
Because that would result in observable changes to any TypedArray or DataView backed by it.
122-
123122
</dd>
124-
<dt>
125123

126-
Should `transferToImmutable` support a `newByteLength` argument?
127124

128-
</dt>
129125
<dt>
126+
Should the index properties of a TypedArray backed by an immutable ArrayBuffer be configurable and writable?
127+
</dt>
128+
<dd>
129+
No, TypedArray index properties should continue to track the state of the underlying buffer without individual bookkeeping.
130+
</dd>
130131

131-
Should trying to write data in an immutable ArrayBuffer via a TypedArray element set throw, even though trying to write out-of-bounds or to a detached ArrayBuffer does not?
132132

133-
</dt>
134133
<dt>
135134

136-
Should the index properties of a TypedArray backed by an immutable ArrayBuffer be configurable and writable?
137-
135+
Should `transferToImmutable` support a _newByteLength_ argument?
138136
</dt>
139137
<dd>
138+
It might be useful for truncation, but probably rarely for expansion because the output would have an all-zeroes suffix that could not be changed.
139+
</dd>
140140

141-
No, TypedArray index properties should continue to track the state of the underlying buffer without individual bookkeeping.
142141

142+
<dt>
143+
144+
Should ArrayBuffers support zero-copy slices (e.g., `arrayBuffer.sliceToImmutable()`)?
145+
</dt>
146+
<dd>
147+
https://github.com/tc39/proposal-immutable-arraybuffer/issues/9
143148
</dd>
149+
150+
144151
<dt>
152+
Should trying to write data in an immutable ArrayBuffer via a TypedArray element set throw, even though trying to write out-of-bounds or to a detached ArrayBuffer does not?
153+
</dt>
145154

146-
Should TypedArray write methods (`copyWithin`, `fill`, `reverse`, `set`, etc.) throw when their backing ArrayBuffer is immutable but the targeted range is zero-length? If so, how early or late in the algorithm? The methods currently inspect arguments after ValidateTypedArray.
147155

156+
<dt>
157+
158+
Should TypedArray write methods (`copyWithin`, `fill`, `reverse`, `set`, etc.) throw when their backing ArrayBuffer is immutable but the targeted range is zero-length? If so, how early or late in the algorithm? The methods currently inspect arguments after ValidateTypedArray.
148159
</dt>
160+
161+
149162
<dt>
150163

151164
Similarly,
@@ -154,4 +167,6 @@ Similarly,
154167
* And also for `Atomics` functions.
155168

156169
</dt>
170+
171+
157172
<dl>

0 commit comments

Comments
 (0)