Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > Re: Singleton
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 26 of 30 Topic 35510 of 37166
Post > Topic >>

Re: Singleton

by VK <schools_ring@[EMAIL PROTECTED] > May 25, 2008 at 05:07 AM

On May 25, 3:42 pm, Lasse Reichstein Nielsen <l...@[EMAIL PROTECTED]
> wrote:
> In a prototype based language, you
> can create an object directly, so there is no need to introduce
> an otherwise unnecessary type for a single object.

From a clean pattern point of view it is arguable IMHO. If there is an
object distinctly different from the generic Object then why not to
introduce a specific constructor for it? Besides, the singleton can be
the privileged consumer of other objects' methods where it would be
more convenient to check if (Consumer instanceof MySingleton) rather
than using some workaround checks.

About the overwhelming "closuring" I do agree but it is just the Java/
C-way AFAIK. "The encapsulation is above everything else" -
inheritance, memory leaks, resource consuming - nothing is matter as
long as it is possible to encapsulate yet another chunk into
something. With a CS graduate - so full 4-6 years cycle of such
"training" - not too much possible to do besides nice side advises to
be disregarded :-)
 




 30 Posts in Topic:
Singleton
Ugo <privacy@[EMAIL PR  2008-05-07 10:42:51 
Re: Singleton
Sam -- <noemail@[EMAIL  2008-05-07 14:39:24 
Re: Singleton
Ugo <privacy@[EMAIL PR  2008-05-07 18:14:25 
Re: Singleton
RoLo <rolosworld@[EMAI  2008-05-07 08:06:37 
Re: Singleton
RoLo <rolosworld@[EMAI  2008-05-07 08:08:10 
Re: Singleton
"Richard Cornford&qu  2008-05-21 22:20:21 
Re: Singleton
Ugo <privacy@[EMAIL PR  2008-05-23 16:22:42 
Re: Singleton
Thomas 'PointedEars' Lahn  2008-05-23 20:45:26 
Re: Singleton
"Richard Cornford&qu  2008-05-26 16:19:01 
Re: Singleton
Peter Michaux <petermi  2008-05-23 11:07:58 
Re: Singleton
Ugo <privacy@[EMAIL PR  2008-05-24 17:58:50 
Re: Singleton
"Richard Cornford&qu  2008-05-26 16:18:58 
Re: Singleton
"P. Prikryl" &l  2008-05-23 12:30:40 
Re: Singleton
Thomas 'PointedEars' Lahn  2008-05-23 21:54:35 
Re: Singleton
Peter Michaux <petermi  2008-05-23 12:43:47 
Re: Singleton
VK <schools_ring@[EMAI  2008-05-24 09:13:44 
Re: Singleton
Peter Michaux <petermi  2008-05-24 09:25:50 
Re: Singleton
Ugo <privacy@[EMAIL PR  2008-05-25 00:02:02 
Re: Singleton
VK <schools_ring@[EMAI  2008-05-24 13:31:52 
Re: Singleton
Peter Michaux <petermi  2008-05-24 16:19:51 
Re: Singleton
Ugo <privacy@[EMAIL PR  2008-05-25 09:01:38 
Re: Singleton
"Richard Cornford&qu  2008-05-26 16:19:05 
Re: Singleton
VK <schools_ring@[EMAI  2008-05-25 01:31:38 
Re: Singleton
Lasse Reichstein Nielsen   2008-05-25 13:42:07 
Re: Singleton
Lasse Reichstein Nielsen   2008-05-25 13:52:35 
Re: Singleton
VK <schools_ring@[EMAI  2008-05-25 05:07:35 
Re: Singleton
Lasse Reichstein Nielsen   2008-05-25 15:11:19 
Re: Singleton
VK <schools_ring@[EMAI  2008-05-25 08:35:40 
Re: Singleton
Peter Michaux <petermi  2008-05-25 10:18:55 
Re: Singleton
Peter Michaux <petermi  2008-05-21 21:14:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 9:53:37 CDT 2008.