Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-28 09:42:44

Alisdair Meredith wrote:
> Martin Wille wrote:
>> Otherwise, I completely agree with Joel's reasoning that
>> "resource" is the best name.
> I have mulled it over for a while, and tried to imagine myself coming
> at the issue for the first time, as someone learning C++ rather than
> learning/devising new tricks.
> In this case, I find resource seems to work best, even though it is
> not my original term of choice.
> I certainly prefer it over anything with an abbreviation which may
> work for native English speakers might break the word-association for
> the rest [maybe being overly patronising here, after all it's not MY
> problem <g>]

Many native C++ but non-native English speakers don't place much importance
on names. You could call it "fish" or "frog" and it wouldn't slow me down
one bit. ;-)

However, an ownership strategy-derived name looks better.


resource<file> // OK, a resource, but what happens when I copy it?
resource<T*> // ditto
ptr<T> // ditto, generic name, no meaning

It depends on the choice of template parameters, of course. If you go the PB
way, resource<> is definitely a contender:

smart_ptr<T, counted>
resource<T*, counted>
resource<T, counted>

Boost list run by bdawes at, gregod at, cpdaniel at, john at