|
Boost : |
Subject: Re: [boost] [system][filesystem v3] Question abouterror_code arguments
From: Olaf van der Spek (olafvdspek_at_[hidden])
Date: 2009-10-27 14:58:35
On Tue, Oct 27, 2009 at 7:47 PM, Andrey Semashev
<andrey.semashev_at_[hidden]> wrote:
>> Why is it necessary to impose a single view on the language? Â Authors
>> often give advice and situations demand certain concessions. Â Isn't
>> it reasonable to accommodate many use cases? Â If you're too
>> restrictive, you make C++ less appealing and users will choose other
>> languages. Â Is that helpful?
>
> I wouldn't say that it would narrow the language in some way. You still get
> the same functionality, only error reporting mechanism is in question. Using
> exceptions for this purpose is, well... following the language spirit, so to
> say, while mandating a dual approach honors code diversity. I happened to
> support some code that used both exceptions and error codes for error
> reporting, and I must say it was a pain. I think, at least for educational
> purposes one form of functions (the throwing one) should be highlighted as
> preferred.
I think there's a difference between errors and exceptions. Exceptions
shouldn't be used in all cases.
Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk