
On 4/26/2011 5:00 PM, Phil Bouchard wrote:
On 4/26/2011 12:57 AM, Phil Bouchard wrote:
Thanks for the suggestions everybody but I'm now considering: mutual_ptr, which tells what it's made for. The "set" qualifier should be hidden from the user because it'll make the code cleaner.
mutual_ptr or: common_ptr public_ptr joint_ptr allot_ptr
I personally prefer the latter so if there's no objection then I'll go for it.
-Phil
None of those seem like very good options: mutual is a synonym for shared. Even shared_ptr's name does not say what its sharing mechanism is (apparently ref_counted_ptr wasn't popular!), so trying to inject those semantics into a short name is probably asking too much of the name. Algorithms are often qualified by their creators' names: have you considered naming the ptr after the creator of its sharing mechanism? Conceptually, shared_ptr could have had sharing semantics injected by a template parameter (like the RNG concept has semantics injected by algorithms named like mt19937), but obviously it's too late for that. Have you ever met Edward Diener? The reaction of naming affinity vs. naming apathy could power a small country. ;) -Matt