What    |Removed                     |Added
                 CC|                            |
            Summary|write(f)(ln) throws         |write(f)(ln) delays throwing
                   |StdioException("Bad file    |StdioException("Bad file
                   |descriptor") when no console|descriptor") when no console
                   |is available                |is available

------- Comment #1 from  2008-12-29 10:21 -------
How can it never fail at all?  Or are you confusing "fail" with "throw an

In any case, failing silently is completely the wrong approach.  If there is no
stdout to write to, it should throw an immediate exception.  That's what
exceptions are there for.

printf doesn't suppress errors.  It returns a value that indicates success or
failure.  This is because C doesn't have exception handling, and so C functions
have to improvise.  In D, OTOH, the only right thing to do is use exceptions to
indicate failure.


Reply via email to