Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-07-03 (11:36)
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.

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 Archives:
Bug reports: FAQ:
Beginner's list: