Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-11-14 08:34:39


> -----Original Message-----
> From: Rainer Deyke [mailto:root_at_[hidden]]
>
> ----- Original Message -----
> From: "Gennadiy E. Rozental" <rogeeff_at_[hidden]>
>
> > --- In boost_at_y..., "Rainer Deyke" <root_at_r...> wrote:
> > > ----- Original Message -----
> > > From: "Gennadiy E. Rozental" <rogeeff_at_m...>
> > > To: <boost_at_y...>
> > > Sent: Tuesday, November 13, 2001 1:22 PM
> > > Subject: [boost] Re: Work in progress list? And how about a
> > singleton?
>
> > In my expirience need for the singleton abstraction is encountered
> > rather frequently. So I think I have some original problem that I
> > need to find a solution for.
>
> I frequently encounter the need for a global resource. I have yet to
> encounter a single situation where a singleton (i.e. a class that only has
> one instance) is the best way to implement that resource. I suspect you
are
> overdesigning.

I have encountered that need in Boost.Pool, but only because of how
restrictive the Standard Allocator requirements are. If it wasn't for them,
I wouldn't need one.

Like you, I'm more inclined to just declare global resources as normal
objects, and just create instances of them in main(). I have never used an
actual Singleton except as mentioned above.

So, maybe we don't need one after all?

        -Steve


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