|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 2001-11-15 12:01:35
Beman:
>> I'm with Darin. The default should always be as safe as possible, so that
>> new/inexperienced/forgetful users don't get bitten. Thus the default
>> should always be to error check.
Peter:
> I already responded to Darin in another message about this.
>
> Making BOOST_ASSERT on by default doesn't automatically guarantee checks.
> (It's like raising taxes.) It has to be used to be effective. 'On by
> default' leads to _less_ use of BOOST_ASSERT, which in turn means that the
> 'missing checks' are 'always off.'
>
> For example, smart_ptr.hpp's error checks are currently 'always off.'
Let me try to paraphrase:
Peter: Asserts default off.
Darin: Why not default on?
Peter: If asserts default off, we can add asserts to code that currently
doesn't have asserts, without changing things for existing users.
While I understand this argument, I am not convinced. If it was up to me, I
would still have the asserts default on, as with the C standard <assert.h>.
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk