Return streams from getStdOut
, getStdIn
, and getStdErr
#3823
Labels
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
standard library
This issue involves writing Zig code for the standard library.
Milestone
In the Zig codebase (and in my own, what little that is), almost every call to these functions immediately performs
[in|out]Stream().stream
. IfgetStdOut
and friends just returned the streams directly, that would probably DRY a lot of code. PerhapsgetStdOutFile
could be added for less common use-cases.Exceptions I found in Zig codebase:
stdout_file.write()
in a couple places, butOutStream
haswrite
too.cat_file
in a test takesfs.File
s, but it looks like it's implementation is only concerned with aread
andwrite
method on its arguments, and would probably not be hard to change.The text was updated successfully, but these errors were encountered: