Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] prevent more than one object
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mirko Aigner <Mirko.Aigner@a...>
Subject: Re: [Caml-list] prevent more than one object
John Max Skaller wrote:

> Why? Its a design error. Fix your design.
> 
> There's never any need for a singleton object,
> 
> because there is no resource for which there
> cannot be more than one. I have seen (C++) designs
> using singletons and they create an utter mess
> because someone wrongly assumed something was
> unique.
> 
> If you want one object, define the class in your
> mainline, create it, and then coerce it to
> a shared class type which does not provide a constructor.
> 

Maybe you're right, but this is not the right place to discuss the 
usefullnesss of the design patterns described by the GoF.
Vincente and Wagner describe in their paper, that singleton pattern 
could be implemented with modules. 
sdg.lcs.mit.edu/~dnj/6898/projects/vicente-wagner.pdf

I was testing it and got some problems, mentioned it here and got some 
hints how to solve the problem.

THANKS to all helping me with it!!

Mirko Aigner


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners