<br><br><div class="gmail_quote">On Fri, Mar 1, 2013 at 7:05 AM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ron,<br>
<br>
Oh dear. Here I was hoping it was just a Squeak bug, because that<br>
would be easy to fix. You can&#39;t define a method &quot;foo : arg&quot; after all;<br>
the : is part of the selector.<br></blockquote><div><br></div><div>But you can define foo:arg.  The point is that the : is part of the selector, and whitespace after the colon and before the formal variable is allowed.  So [:a:b:c| is analogous to a selector :::.  It&#39;s more obvious if one writes _: a _: b _: c, etc.  This syntax was thought about carefully.</div>
<div><br></div><div>BTW, you can also define a method that looks like</div><div><br></div><div>&quot;comment&quot; foo ^self</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I stumbled upon this because I noticed that Haskell&#39;s type identifiers<br>
- like &quot;add :: Int -&gt; Int -&gt; Int&quot; are very nearly valid Smalltalk.<br>
It&#39;s just the &quot;::&quot; that&#39;s not valid because we don&#39;t permit :s in<br>
binary selectors.<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 1 March 2013 14:48, Ron Teitelbaum &lt;<a href="mailto:ron@usmedrec.com">ron@usmedrec.com</a>&gt; wrote:<br>
&gt; Hi Frank,<br>
&gt;<br>
&gt; I know this is true for a number of Smalltalk implementations.  I found it<br>
&gt; very surprising also.  Someone I worked with always formatted their code<br>
&gt; this way.  He said it made it easier to double click and highlight the<br>
&gt; variable.  I wasn&#39;t sure that was enough reason to do it but he did.<br>
&gt;<br>
&gt; Ron<br>
&gt;<br>
&gt;&gt; From: <a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">squeak-dev-bounces@lists.squeakfoundation.org</a> [mailto:<a href="mailto:squeak-dev-">squeak-dev-</a><br>
&gt;&gt; <a href="mailto:bounces@lists.squeakfoundation.org">bounces@lists.squeakfoundation.org</a>] On Behalf Of Frank Shearar<br>
&gt;&gt;<br>
&gt;&gt; I was rather surprised to learn that the following is valid syntax:<br>
&gt;&gt;<br>
&gt;&gt;     [ : x | x + 1]<br>
&gt;&gt;<br>
&gt;&gt; (Note the space before the argument name.)<br>
&gt;&gt;<br>
&gt;&gt; In fact, this is too:<br>
&gt;&gt;<br>
&gt;&gt;     [ : &quot;This is a really long comment in a very, very strange place.<br>
&gt;&gt; It makes it very hard to see that the : before this comment turns the<br>
&gt; token after<br>
&gt;&gt; this comment into a block argument.&quot; x | x + 1]<br>
&gt;&gt;<br>
&gt;&gt; Is that intentional? Does ANSI Smalltalk define it?<br>
&gt;&gt;<br>
&gt;&gt; frank<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>