|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2004-07-18 00:33:33
David Abrahams wrote:
>[...]
>>Ah, but you yourself have said that the guarantees do not form a
>>hierarchy, so there is no proper notion of "stronger" with respect
>>to them. ;)
>
> Whaaaa??? I never said that! Or I was delusional when I did.
Well, perhaps you remember a thread in which I suggested another
guarantee that I called the "smart guarantee" which was a cross
between the strong and the basic guarantee. You argued that one
could invent any number of guarantees that offer different promises
and which could not be ordered in any purely objective way. It was
a fairly convincing argument at the time. Are you going to retract
it? ;>
>[...]
>>Saying that it maintains its invariants instead of saying that it
>>gives the basic guarantee does not convey the right message, in my
>>opinion, because many programmers obviously do not feel a need to
>>maintain invariants in the presence of exceptions (or they would write
>>more exception-safe code).
>
>
> I don't see the connection. What message do you think it should send
> that it does not send?
That it maintains invariants *in the presence of exceptions*. The
latter part is implicit, but if the user isn't thinking in terms of
exception safety to begin with, then they may well miss that part.
When you say "provides the basic guarantee", if the user is not
familiar with exception safety, she will at least have an opportunity
to investigate it. Of course, you could just say both.
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk