-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need new names for { input, output } #174
Comments
Remember these show up in two places:
In reality these cases kind of blend together. E.g. you may normally think of a web worker as a duplex stream, for which the two sides are disconnected (kind of like a child process). So in theory this decision doesn't matter for them, right? And that might normally be true, except what if you are using a web worker to implement a transcoding algorithm? If web workers used the conventional properties recognized by |
@substack suggests |
Also in the running |
My vote is on |
Lots of "this actually means the opposite of what you think" regarding these properties... @_@ |
The confusion stems from perspective and is somewhat unavoidable because streams are meant to be plumbled together such that the output of one stream is the input of the next. |
I proposed "ingress" and "egress". I tried to pick words that create an unambiguous gradient -- data goes into the ingress, and comes out of the egress. I'm also okay with "readable" and "writable", for similar reasons, though they might run into the perspective problem -- an author of a function that creates a duplex stream pair has to view "readable" as where data will be written to, and "writable" as the side that accepts incoming data. |
I have heard { source, sink } used or { faucet, sink }. Plus it fits in the streams/pipe metaphor :-) writable: It can write...or one can write to it? |
my vote would be { writable, readable } as its clear its based on capability not role |
@llambda I don't think it's confusing at all. If you have a book that is readable, you know you can read from it. If you have a piece of paper that is writable, you know you can write on it |
I'm a bit late, but slowly catching up on things now. I also personally liked writeable/readable, and think the changes look good and also read well. Also slightly follows how the Windows Runtime speaks about streams, so there is some precedence. |
Originally raised in sysapps/tcp-udp-sockets#69.
My thinking has been that you write things in to the input (a writable stream), and you read them out of the output (a readable stream).
Apparently this is at odds with most other programming libraries, for which you write to output and read from input. Unix stdin/stdout is an example, but also some Java stream APIs.
We could just switch them, and that's my fallback position. I am curious if there is a better name pair.
The text was updated successfully, but these errors were encountered: