By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,127 Members | 1,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,127 IT Pros & Developers. It's quick & easy.

Singleton Pattern

P: n/a
What is the practical significance of Singleton Pattern

Jul 23 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
sa*****@gmail.com schrieb:
What is the practical significance of Singleton Pattern


The singleton pattern is a theoretical abstraction layer for people
thinking in patterns to understand the phenomenon of a single object's
loneliness.

T.M.
Jul 23 '05 #2

P: n/a
When you want to treat some bundled behaviour/state as an object, but
there can be only one of them in the application. e.g. your
application or your process. (Contrast with when you'd prefer a
namespace in C++)

Stuart

Jul 23 '05 #3

P: n/a
This pattern allows you to allow only one instance of a class in an
application.

It is one of the patterns that I saw missused very often.

It is also badly used in multithreaded applications, in combination
with lazy initialization of the instance.

Catalin

Jul 23 '05 #4

P: n/a
sa*****@gmail.com wrote:
What is the practical significance of Singleton Pattern


Singleton is an 'Anti-Pattern', i.e. it should be avoided whenever
possible.

Jul 23 '05 #5

P: n/a
On 19 Jul 2005 08:42:55 -0700, Mercator <me********@spambob.com> wrote:
sa*****@gmail.com wrote:
What is the practical significance of Singleton Pattern


Singleton is an 'Anti-Pattern', i.e. it should be avoided whenever
possible.


could you give some rational for this opinion of yours?
Jul 23 '05 #6

P: n/a
ulrich <ua********@aon.at> schrieb:
Singleton is an 'Anti-Pattern', i.e. it should be avoided whenever
possible.


could you give some rational for this opinion of yours?


I gave some hints in a previous thread started here:

<11**********************@o13g2000cwo.googlegroups .com>

T.M.
Jul 23 '05 #7

P: n/a
In message <u8***********@fastmail.fm>, Torsten Mueller
<de******@shared-files.de> writes
ulrich <ua********@aon.at> schrieb:
> Singleton is an 'Anti-Pattern', i.e. it should be avoided whenever
> possible.


could you give some rational for this opinion of yours?


I gave some hints in a previous thread started here:

<11**********************@o13g2000cwo.googlegroups .com>

Were you posting as "panjandrum", "rapscallion" or "mercator" at the
time?

--
Richard Herring
Jul 23 '05 #8

P: n/a
Richard Herring wrote:
Were you posting as "panjandrum", "rapscallion" or "mercator" at the
time?


I'm definitely the one and only Mercator!

Jul 23 '05 #9

P: n/a
In message <11*********************@g43g2000cwa.googlegroups. com>,
Mercator <me********@spambob.com> writes
Richard Herring wrote:
Were you posting as "panjandrum", "rapscallion" or "mercator" at the
time?


I'm definitely the one and only Mercator!

I thought you didn't approve of singletons?

Especially polymorphic ones.

--
Richard Herring
Jul 23 '05 #10

P: n/a
Richard Herring <ju**@[127.0.0.1]> schrieb:
Were you posting as "panjandrum", "rapscallion" or "mercator" at
the time?


I'm definitely the one and only Mercator!


I thought you didn't approve of singletons?

Especially polymorphic ones.


I'm not polymorphic. I'm T.M. all the time and also in other news
groups for more than six years now. Look into my header lines and look
into Mercator's: he is from Austria while I'm located in Switzerland.

T.M.
Jul 23 '05 #11

P: n/a
In message <um***********@fastmail.fm>, Torsten Mueller
<de******@shared-files.de> writes
Richard Herring <ju**@[127.0.0.1]> schrieb:
> > Were you posting as "panjandrum", "rapscallion" or "mercator" at
> > the time?
>
> I'm definitely the one and only Mercator!


I thought you didn't approve of singletons?

Especially polymorphic ones.


I'm not polymorphic. I'm T.M. all the time and also in other news
groups for more than six years now. Look into my header lines and look
into Mercator's: he is from Austria while I'm located in Switzerland.

So you are. Apologies for confusing you with a troll; I thought you were
referring to a more recent thread about singletons.

--
Richard Herring
Jul 23 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.