From: Glen Knowles (gknowles_at_[hidden])
Date: 2001-11-15 17:35:51
In general I would argue in favor of enabling asserts by default, but since
this is for what /to me/ is a third party library I'm less interested in
preventing day to day programming errors inside the library. This may be
impractical, but ideally I would like asserts to default on for the
preconditions of functions that I use as a client and default off for
internal implementation functions and classes.
From: Peter Dimov [mailto:pdimov_at_[hidden]]
Sent: Thursday, November 15, 2001 9:20 AM
Subject: Re: [boost] Boost.Assert
From: "Darin Adler" <darin_at_[hidden]>
> 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
> doesn't have asserts, without changing things for existing
Something like that, yes, but in addition:
Peter: Asserts default on lead to less assert use since they are no longer
'free' but need a cost/benefit analysis. See current Boost state. In
particular, Beman's general opinion is that checks should be on by default
but smart_ptr.hpp doesn't have checks.
> While I understand this argument, I am not convinced. If it was up to me,
> would still have the asserts default on, as with the C standard
It's a difficult decision in general.
-- Peter Dimov Multi Media Ltd. Info: http://www.boost.org Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk