<div class="gmail_quote">Wow...I completely missed the Clamato announcement.  Fantastic!</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Sep 4, 2009 at 1:53 PM, Dan Ingalls <span dir="ltr">&lt;<a href="mailto:Dan@squeakland.org">Dan@squeakland.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi, Avi -<br>
<div class="im"></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt;I don&#39;t love the @ syntax, but it has at least two advantages.  One is</div>

<div class="im">
&gt;that, by essentially moving instance variable declarations into the<br>
&gt;methods, you can easily add instance variables to classes in other<br>
&gt;packages - Squeak has never had a good way to do this.  The other is<br>
&gt;that methods can be parsed and compiled with no context - unlike in<br>
&gt;Smalltalk, can identify instance variables vs. temps vs. globals<br>
&gt;without knowing anything about the class you are compiling the method<br>
&gt;for.  OTOH it&#39;s kind of ugly.<br>
<br>
</div>With all due respect, I agree ;-).</blockquote><div><br></div><div>What if you used normal temp var declaration syntax, but just added an &quot;@&quot; to indicate instance variables...here is the counter example rewritten in that form..it seems more palatable to me and would have the advantages you mention:</div>

<div><br></div><div><div>&lt;Example&gt;</div><div><br></div><div>- open</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| @root |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>root := &#39;#example&#39; q.</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>self reload.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self.</div><div><br></div><div>- reload</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>| @root |</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>root contents: [:html | self renderOn: html].</div><div><br></div><div>&lt;Counter&gt;</div><div><br></div><div>+ superclass</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Example.</div>

<div><br></div><div>- initialize</div><div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>| @counter |</div></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>counter := 0.</div>

<div><br></div><div>- renderOn: html</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>| @counter |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html h3 with: counter.</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>html button</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>with: &#39;+&#39;;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>onClick: [counter := counter + 1. self reload].</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>html button</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>with: &#39;-&#39;;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>onClick: [counter := counter - 1. self reload].</div>

<div><br></div></div></div>