From: Dan W. (danw_at_[hidden])
Date: 2004-01-04 19:21:19
Jim Apple wrote:
> Dan W. wrote:
>> If I said to you, I'll pay you a thousand dollars to keep this phone
>> book for one night, and make sure it's not altered in any way, and you
>> agree... Now, next day I come to pick up the phone book and you ask
>> for the 1G, and I say, "well, you didn't do your job", and you say
>> "how not? the book is safe!" and then I say "125 people died last
>> night, that were listed in that phone book, you were to prevent that".
> What if the phone book was only super-secret addresses of gold bricks,
> say? Then, owning the phone book is equivalent to owning the bricks.
If you took names at random out of that phone book I entrusted you with
and phoned people at 2AM just to bother them, robbed them, or firebombed
their houses, I'd think you a monster, to be sure, but I wouldn't
specifically accuse you of violating the phone-book safe-keeping
contract. Not that I wish to preclude the existance of deeper
contracts, but the contract as it exists, is not being violated, IMO.
> There's some serious analogy decay here, but the point is, sometimes
> owning the pointer is equivalent to owning the pointee.
> Maybe it would help everyone if you explianed why that shouldn't happen
> or isn't applicable here.
Okay, I'm not sure whether by "here" you mean this thread, as it
unfolds, or value_ptr. Let me say first that I'd welcome AND use (a lot)
a pointer with ownership and constness propagation as well as deep copy.
I think it would be a valuable addition. I just don't agree that, not
having such semantics in existing smart pointers constitutes a violation
of constness correctness, or that allowing const functions to call
non-const, non-member functions does; for that amounts to saying that
the working definition of const-correctness in the language is
ill-formed. For someone to claim that, she'd have to prove that there
is some self-contradiction in it, which I don't think is the case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk