18112, "mppf", "Should we rename I/O channels to reader and writer?", "2021-07-26T17:37:47Z"
Today we have a channel
type for use in the I/O system. An I/O channel can either be a reading channel or a writing channel.
This issue proposes that we deprecate the term channel
for this and instead have types reader
and writer
. Then we can add a generic type that matches either of these (for example, readerOrWriter
could be a 1st try at a name for it) that would be supported by an interface eventually but might be directly supported in the compiler for now.
E.g. in this typical use case from the fileIO primer:
// Get a binary writing channel for the start of the file.
var w = f.writer(kind=ionative);
it would be reasonable for the type of w
to be writer
rather than channel(writing=true)
.