<br><br><div class="gmail_quote">On Mon, Feb 1, 2010 at 01:22, lanas <span dir="ltr"><<a href="mailto:lanas@securenet.net">lanas@securenet.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
CarAssembler class>>using: aCarFactory<br>
^self new factory: aCarFactory<br>
<br></blockquote><div>I think this a pattern for instance creation.</div><div>The point is that you can clearly see what it takes to create a instance of CarAssembler, namely, a CarFactory.</div><div><br></div><div>Notice that:</div>
<div><font class="Apple-style-span" face="'courier new', monospace">self new "will create the instance"</font></div><div><font class="Apple-style-span" face="'courier new', monospace">factory: a CarFactory "is storing aCarFactory in the instance, not the class"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></div><div><br></div></div>