Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-05-05 06:59:29


From: "David B. Held" <dheld_at_[hidden]>
> I would like to see people comment on the various questions:
>
> 3. Which is best for Boost, and which is best for a library proposal?
> A) just shared_ptr
> B) just smart_ptr
> C) shared_ptr + smart_ptr
> D) other

What do 'shared_ptr' and 'smart_ptr' mean? Or, to be more specific: does
'shared_ptr' refer to an entity _named_ shared_ptr, to an entity that meets
the specification in shared_ptr.htm, or both?

Does 'smart_ptr' refer to a smart pointer framework, to a framework + some
specific precanned policies (since 80% of the users won't write their own),
or to a specific entity created using this framework?

Note how some of the combinations make the question nonsensical. ;-)

Before tackling the above question, I'd like to ask:

3a. Should there be a single smart pointer type that is specifically
designed for interoperability?

3b. Should there be a single smart pointer type that is specifically
designed to cover a variety of common situations without requiring any user
intervention or customization?

3c. Is shared_ptr (the specification) the single smart pointer that meets
3a, 3b, or both?

3d. If it is, which is the best way to provide a smart pointer that meets
that specification?

A) shared_ptr<T>, implementation details unspecified
B) shared_ptr<T>, implementation required to be derived from a general
pointer framework
C) ptr<T>::shared
D) smart_ptr<T> (defaulted parameters)
E) smart_ptr<T, default_config>
F) smart_ptr<T, A, B, C, D>

3e. Allow me to sneak a personal question. Should I bother with refining
shared_ptr (the semantics) any further? I'd rather cut my losses now, to be
blunt.

> 1. Is a policy-based smart pointer still worth pursuing, or are there too
> many
> contentious issues that will never get resolved?

The answer to this political question is probably "yes."

I'd rather see a (concise) answer to the following questions instead:

1a. Why is a smart pointer framework a good thing?

1b. What are the design goals of the framework?

1c. What user problems does this framework address?

1d. How does the framework compare with other solutions to the user problems
in 1c?

You get the idea.


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