Boost logo

Boost :

Subject: Re: [boost] [system][filesystem v3] Question abouterror_code arguments
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-10-27 14:14:19


David Bergman wrote:

>> What I want to point out is that IMO, exceptions are sometimes
>> undeservedly ignored for different reasons. One of such reasons is
>> developer's commons, if he got used to code without exceptions and/or
>> cannot use them properly for the lack of knowledge. Another reason is
>> attempt to achieve overzealous portability, be that ancient buggy
>> compilers from the dawn of C++ or some exotic platforms without
>> exceptions support. All these reasons are valid, at least for now.
>>
>> But for how long? Developers eventually learn things or move to other
>> languages (C?). Ancient compilers die, new ones become more popular
>> and more efficient. Exotic platforms also either tend to decease or
>> evolve. In my mind, error handling through exceptions should become
>> more preferred over time. Expressing and honoring this tendency in the
>> Standard for the coming 5 years may not be such a bad idea after all.
>
> I agree with all you said, but (i) one should understand the *current*
> need for exception-less solutions and (ii) the idea that (C++) code
> without exception constructs is in some sense nonsensical is, well,
> nonsensical ;-) - all this while striving for exception handling
> everywhere possible and try to push compiler writers to make such
> handling even more efficient.

Perhaps, we could mark the non-throwing overloads as deprecated in the
Standard? Like strstreams, they are there but generally throwing
overloads are more preferred.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk