Skip to content

Add more documentation for stream.{read,write}.#541

Merged
lukewagner merged 1 commit into
WebAssembly:mainfrom
sunfishcode:sunfishcode/stream-wording
Jul 8, 2025
Merged

Add more documentation for stream.{read,write}.#541
lukewagner merged 1 commit into
WebAssembly:mainfrom
sunfishcode:sunfishcode/stream-wording

Conversation

@sunfishcode
Copy link
Copy Markdown
Member

Notably:

  • Document what stream.{read,write} do after a copy-result.dropped, similar to what is documented for future.{read,write}.

  • Document that copy-result.dropped does not signify an error.

  • Reword "the only valid next operation is" to "anything subsequent operation [...] traps" to avoid confusion about what "valid" means in this context.

  • Say "single-element" instead of "length-1" so that it doesn't risk scanning as "length minus one".

Notably:

 - Document what stream.{read,write} do after a `copy-result.dropped`, similar to
   what is documented for future.{read,write}.

 - Document that `copy-result.dropped` does not signify an error.

 - Reword "the only valid next operation is" to
   "anything subsequent operation [...] traps" to avoid confusion about what
   "valid" means in this context.

 - Say "single-element" instead of "length-1" so that it doesn't risk
   scanning as "length minus one".
Copy link
Copy Markdown
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@lukewagner lukewagner merged commit 5315943 into WebAssembly:main Jul 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants