When Mark Terribile proposed a class like this way back in the last century I think he called it "releaser".
At 04:00 PM 2/25/2003, Rozental, Gennadiy wrote: >> This is an excellent point. One doesn't go looking for a class >> named "smart_ptr" or a library named "Boost.SmartPointer" when >> looking to manage the lifetime of some arbitrary resource. When >> one uses pointers, it makes sense. > >I would be searching namely for smart_ptr. I know that smart pointer is the >name for the resource management idiom. > >> > It is a shame for things to simply be the way that they are simply >> > because they started out from a specific beginning... >> >> History always has a way of biting us. In this case, we are >> creating something brand new in Boost. There isn't a PBSP in >> boost. Therefore, if it is a manifestation of a SmartResource >> concept or is implemented in terms of a smart_resource class >> isn't as important as the recognition that it is a special case >> of the more abstract concept. >> There can still be a smart_ptr class, even if there's a >> smart_resource class. Both may be separate manifestations, >> possibly sharing some implementation details, of a SmartResource >> concept. Equally plausible, smart_ptr could be implemented in >> terms of smart_resource somehow (derivation, aggregation, >> whatever). > >This all would make sense if you could find at least "10 differences" >between "smart resource" and "smart pointer". > >> Names are important. Witness the recent discussion about whether >> pointers are resources, refer to resources, or may refer to >> resources. Words convey meaning. The wrong words confuse. The >> right words clarify. The same is true for names. Yes, one can >> learn that "smart_ptr" means resource manager for which pointer >> semantics may be appropriate. But, far better is to have >> "smart_resource" and "smart_ptr" as separate classes. The latter >> provides a superset of the behavior of the former, but the former >> may be precisely what's needed in a given context. > >In general I agree that names are important. In general, but not in this >particular case. >If names are so important for you here, why do you try to use the name >"smart resource"? >What is "smart" here? May be we should use "clever" or "cunning" or "wise"? >And what word "resource" is doing here? It almost never the resource itself, >but the manager code for some resource (it may not even hold reference to >the resource itself inside). As I sad before IMO most close name would be >"resource_manager". But I still do not see a reason in introducing new >terms, while already exist well established idiom with name "smart pointer" > >Gennadiy. >_______________________________________________ >Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost