<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/1a00e490e8337df3f522867c8a55be6e"
  from="Mirko Aigner &lt;Mirko.Aigner@a...&gt;"
  author="Mirko Aigner"
  date="2003-07-03T11:36:21"
  subject="Re: [Caml-list] prevent more than one object"
  prev="2003/07/e6b497b6561e6b659094f56674cbd2d4"
  next="2003/07/66caba7829a123e6bb39d1d9c4b9bb00"
  prev-in-thread="2003/07/e6b497b6561e6b659094f56674cbd2d4"
  prev-thread="2003/07/d3684049ef97610c271443c5f8c1c003"
  next-thread="2003/07/9d5c44985ef4846fa1879e4f91dc551f"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] prevent more than one object">
<msg 
  url="2003/07/49d3704bd9b76044d06a619f87144574"
  from="Mirko Aigner &lt;Mirko.Aigner@a...&gt;"
  author="Mirko Aigner"
  date="2003-07-02T16:14:24"
  subject="[Caml-list] prevent more than one object">
<msg 
  url="2003/07/1289d7b595f1d629c162939d33309862"
  from="Nick Name &lt;nick.name@i...&gt;"
  author="Nick Name"
  date="2003-07-02T16:42:04"
  subject="Re: [Caml-list] prevent more than one object">
</msg>
<msg 
  url="2003/07/e6b497b6561e6b659094f56674cbd2d4"
  from="John Max Skaller &lt;skaller@o...&gt;"
  author="John Max Skaller"
  date="2003-07-03T11:20:34"
  subject="Re: [Caml-list] prevent more than one object">
<msg 
  url="2003/07/1a00e490e8337df3f522867c8a55be6e"
  from="Mirko Aigner &lt;Mirko.Aigner@a...&gt;"
  author="Mirko Aigner"
  date="2003-07-03T11:36:21"
  subject="Re: [Caml-list] prevent more than one object">
</msg>
</msg>
</msg>
</thread>

<contents>
John Max Skaller wrote:

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

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

</contents>

</message>

