3 ms·
That's a good rule, pity about the name. If we could go back in time and make it stdin, stdout, and stdext (because UNIX so six letters, but standard_extra, or
by samatman 3y ago
That's a good rule, pity about the name.
If we could go back in time and make it stdin, stdout, and stdext (because UNIX so six letters, but standard_extra, or standard_extended), we might have a prayer of getting people to follow that convention.
But it's called stderr, so devs think, quite reasonably, that it should be used for error reporting, and conversely, if it isn't an error, it goes in stdout.
But I agree with you that this is the better way to structure a program. You might confuse more people with it, but they'll be able to do more useful things with its output, so that's a win.
- OJFord 3y agoI think if I could go back in time, my fix would be to make stderr the default. i.e. everything written 'out' goes to stderr until you explicitly write it as an output to stdout (or another descriptor/file), the inverse of the current situation. (Ok, sure, I'd probably change the name too!)
- nerdponx 3y agoPowershell has something like 5 or 6 different output streams.
- OJFord 3y agoUnix doesn't really have a limit that I know of, certainly not a low one, stdin/out/err are just names for the (very) common descriptors numbered 0/1/2 respectively; you can use another. (In fact it's sometimes helpful in scripting for dealing with exactly this issue of potentially badly behaved subprocesses.)