Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-20 16:41:12


"Andrei Alexandrescu" <andrewalex_at_[hidden]> writes:

> "Sam Partington" <Sam.Partington_at_[hidden]> wrote in message
> news:NDBBIABHPAACPOAKLJBHEEOGDOAA.Sam.Partington_at_codescape.com...
>> If they had to decide
>> whether to use shared_ptr, or slightly_faster_ptr, I think they would
> simply
>> not bother.
>
> But it's not just "slightly faster". This is a misconception. For example,
> COM or CORBA pointers are not (or at least were not) usable with shared_ptr.

    Using a shared_ptr to Hold a Pointer to a COM Object
    ----------------------------------------------------

    [COM objects have an embedded reference count, AddRef() and Release(),
    Release() self-destroys when reference count drops to zero.]

    shared_ptr<IWhatever> make_shared_from_COM(IWhatever * p)
    {
        p->AddRef();
        shared_ptr<IWhatever> pw(p, mem_fn(&IWhatever::Release));
        return pw;
    }

    [All pw copies will share a single reference.]

Or did you mean something else?

>> Also, I can't see any future standard having more than one new
>> pointer, and I can't see anything but the already widely used
>> shared_ptr being it.
>
> It turns out that they would so much more prefer a truly extensible
> solution. If I remember correctly, it was all about policy-based
> smart pointers at the last two standards meetings. For them it's all
> the more appealing because they can package it with template
> typedefs, feature that would change the slate completely. However,
> if the boost community does not support, or openly opposes, pbsp's,
> then the committee's opinion might change.

Andrei, I really wish you would stop framing it that way; it just adds
a lot of unneccessary political static to the discussion. Nobody has
even brought forward a formal proposal for a pbsp for boost, or AFAIK
for the standard. It's not as though there is some conspiracy of
unjust and closed-minded refusal to consider such a design around
either community. It's premature to be injecting that implication,
and frankly, it doesn't help your case.

If you really care about this, why don't you work on making a boost
submission or bringing a proposal to the committee for the next
meeting?

>> As we've mentioned loki, is there any update on Loki -> boost
>> integration? A quick check of the archives and nothing seems to
>> have been mentioned since may or so.
>
> My feeling is that the boost community would of course be interested
> in looking over a related submission, but most of its members are
> not interested in actively working on such a port. And let's face
> it, I'm not popular with boost, and that doesn't help generating
> enthusiasm inside boost :o).

I think your perception that your unpopular with boost does more to
hurt your ability to generate enthusiasm than any actual
unpopularity. You seem to have the attitude that the cards are
stacked against you, and to approach boost with a kind of resentment
and resignation that you won't get a fair hearing.

You have made real contributions to the work of many people here; I
know the iterator adaptors library would never have arisen as it did
without ideas you sparked years ago about policy-based design. Why
not apply your great intelligence, humour, and ability to communicate
as productively around here as you do elsewhere?

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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