Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-06-09 09:48:11


At 03:42 PM 6/9/00 +0200, Branko wrote:

>Right. IMHO this could be another general Boost guideline: Always
choose
>safety over efficiency. When providing both, make the safer
implementation
>the default.

Interesting suggestion!

But I don't think it is quite that simple. There are a fair number
of cases (portions of the STL for example) where efficiency wins.

Like so many engineering decisions, it is really a cost versus
benefits decision. We aren't, for example, willing to execute
everything interpretively so more safety checks can be applied.

Let's see if there is a safety versus efficiency guideline we can
agree on. How about:

"Choose safety over efficiency, particularly when the risk is great
or the cost of safety is low. If separate safe or efficient
variations are provided, the safer should be the default."

--Beman


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