Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-30 15:11:13


"Beman Dawes" <bdawes_at_[hidden]> wrote in message
> I skimmed MC++D quickly, but couldn't find your rationale for choice of
> defaults. I'm assuming it was something like "the safest, most commonly
> needed for a wide range of general uses."
>
> Instead, defaults would have to be chosen as "the most widely useful for
> interfacing between libraries."
>
> Now it may be that these two criteria result in the same set of
> defaults. But you need to review your choice of defaults to make sure
that
> is the case.

The current choices are the ones that are most generic and safe:
non-intrusive reference counting, assertion-based checking, and no implicit
conversion. If I'm not wrong, they correspond to the behavior of shared_ptr.

It's unclear to me whether these are the best defaults for interfacing
libraries, although that seems to be the case.

In my opinion, imposing one smart pointer type as a communication tool for
all libraries is not a very worthwhile goal, and might even become a red
herring, as I will detail in a later post. There are many concerns about
inter-module communication, including type safety, efficiency, and ease of
use. Imposing one smart pointer might jeopardize applications on all these
three dimensions.

Andrei


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