suggestion: deprecate `readableStreamFromReader` and point to better alternatives
See original GitHub issueIs your feature request related to a problem? Please describe.
Before I begin my rambling: I created this issue to start a discussion, not sure if this makes any sense at all.
Deno has been continuously moving away from using Deno.reader and (afaik) it is essentially replaced/supplemented in every part of the deno api with a ReadableStream<Uint8Array>. We should continue to push people away from using Deno.reader by deprecating and eventually removing readableStreamFromReader from the std.
To make sure I wasn’t completely insane, I did a quick GitHub search and found that almost every use of readableStreamFromReader was for reading files (which supports ReadableStream<Uint8Array>) and reading stdin/stderr (which also supports ReadableStream<Uint8Array>). We should be pushing people away from using these for those use cases.
The only thing that makes me hesitate a little bit is found in the optional options (autoClose, etc)
Describe the solution you’d like
We deprecate and eventually remove readableStreamFromReader
Describe alternatives you’ve considered
Because of the options, there may be an argument to keep it.
Issue Analytics
- State:
- Created 9 months ago
- Reactions:3
- Comments:10 (10 by maintainers)

Top Related StackOverflow Question
There also is #1986
readableStreamFromReader & its opposite, + the equivalents for writable streams should be deprecated imo