Boost logo

Boost :

Subject: Re: [boost] [Memory Managed Pointer] Review Request
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-04-26 19:20:01


On 4/26/2011 3:34 PM, Matthew Chambers wrote:
> On 4/26/2011 5:00 PM, Phil Bouchard wrote:
>
> 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.

A policy-based smart pointer encapsulating mm_ptr would have been quite
a challenge because of the extra functionality required to initialize
pointee objects.

Perhaps a smart_ptr class template could be implemented to handle all of
shared_ptr, intrusive_ptr, weak_ptr and mm_ptr.

> Have you ever met Edward Diener? The reaction of naming affinity vs.
> naming apathy could power a small country. ;)

The psychologist? I'm careful selecting the right word but so far
mutual_ptr wins because it means what it means and won't clash with
other keywords.

-Phil


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