Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-02-28 14:47:54

>From: "Joel de Guzman" <djowel_at_[hidden]>

> > manager<widget>
> >
> > Manager of widget. It's kind of implied that what is managed is the
> > resource itself, even though "resource" doesn't say anywhere. This is
> > similar to that you think it's implied that resource<widget> means it
> > manages the resource, even though "manage" doesn't say anywhere.
> Look at it this way. Which noun best describes the following:
> 1) You acquire it
> 2) You release it
> 3) You transfer its ownership
> A) manager
> B) resource
> C) managed


> > "resource_manager" starts to look attractive, again. ;)
> Perhaps. But there's a *better* and *shorter* alternative that very well
> the description. We can say: linear_list_of_items_manager<int>, YUCK!
> Instead, we say list<int>. The management *is* implicit!


> Also, in general, I would say that any name suffixed by "_manager" are
> used for classes that manage *many* things simultaneously, NOT JUST ONE.
> Take a window_manager for example. It is something that manages the
> of many windows. In the Macintosh, for example, the resource manager
> "all* the resources in an application.

Right again.

Ok, I agree that resource<> may be a useful name for it, with implied
management, like e.g. std::list<>, as you say.

Anyway, as Dave A points out in another posting, and which was also the
topic of an earlier of mine, the usefulness of the concept in the first
place hasn't been demonstrated.

The reason I jumped in on the naming discussion, is that I thought
managed<>, or rather manager<> could be a possibility, as well. I thought
the same that Dave said, that resource<widget> doesn't really tell me much,
as it seems it's saying the same thing twice; widged is a resource.

Also, as Gennadiy points out, list<> is a list, while resource<> is not a
resource; it's a manager of a resource.



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