From: Phil Nash (phil.nash.lists_at_[hidden])
Date: 2003-02-26 06:09:46
> > I would be searching namely for smart_ptr. I know that smart pointer is
> > the name for the resource management idiom.
> But those that don't would look for "resource_manager" or "resource_mgr"
> (and might even find "res_mgr"). The smart_ prefix is quite useless in
> this context, there isn't an old resource manager that is being replaced.
Good point (I had admitted that smart_resource may not be the best name
either - it was just to get the ball rolling). Something along the lines of
resource_manager has been suggested in a couple of places now.
The fact is that most (I would hope) of those that are subscribed to the
list know what a smart pointer is. Many would also make the extra connection
between smart POINTERs and general RESOURCE management.
But in the field at large a surprising number of people who are working with
C++ have not heard of smart pointers, or even auto_ptr! Of those that have
very few associate them with resource management in general. I would hope
that this idiom would gain a wider audience. It would be a shame if we
"introduced" it to that wide audience with a confusing naming built in, when
we have an opportunity now to rectify that.
Look at it another way (and sorry, this is still more in response to
Gennadiy here), if you *are* one of those who, when they think, "resource
management" they immediately think, "smart pointer"... and you were looking
through boost (or the std lib) and found, "resource_manager"... would you
discount it as being anti-idiomatic and carry on looking for smart_ptr? Or
if you find smart_ptr first and notice that it is a specialisation/
instantiation/ derivation (or whatever) of a more general resource_manager..
would you still ignore this?
I suppose the point is, would it be confusing to have a resource_manager
outside of smart_ptr (whatever the relationship between them)?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk