On Sun, Jan 12, 2020 at 9:19 PM Philip Boampong <pboampo...@gmail.com> wrote:
>
> On Mon, Jan 13, 2020 at 3:07 AM Ian Lance Taylor <i...@golang.org> wrote:
>>
>> The difference between os.Stdout and other files is: if writing to
>> os.Stdout fails, where are you going to report the error?  You could
>> report it to os.Stderr, of course, but if os.Stdout doesn't work then
>> it is very likely that os.Stderr also doesn't work.
>
>
> I'm not sure about the "very likely". It is extremely common to redirect 
> stdout to a file and leave stderr on the terminal (as in my example).
> Even if they are both regular files, they could be on different mount points 
> (although less likely).
> More importantly, in a non-interactive situation the exit status is often 
> used to make decisions, and it is effective regardless of a bad stderr.

Fair enough.


> Also, from your reasoning one could infer that it's not necessary to report 
> os.Stdout.Write errors either, is that correct?

Yes.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXdoKF_qE-tcg%2BtXLRV7iSorT-s-dktezZWfOEtkGT82w%40mail.gmail.com.

Reply via email to