<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2014-02-25 8:17 GMT+01:00 Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 24 February 2014 13:41,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>

&gt; Nicolas Cellier uploaded a new version of Compiler to project The Inbox:<br>
&gt; <a href="http://source.squeak.org/inbox/Compiler-nice.280.mcz" target="_blank">http://source.squeak.org/inbox/Compiler-nice.280.mcz</a><br>
&gt;<br>
&gt; ==================== Summary ====================<br>
&gt;<br>
&gt; Name: Compiler-nice.280<br>
&gt; Author: nice<br>
&gt; Time: 24 February 2014, 10:41:41.999 pm<br>
&gt; UUID: 6e62064c-bd88-4957-98e4-c57da15738fc<br>
&gt; Ancestors: Compiler-nice.279<br>
&gt;<br>
&gt; Accept ^ as a binary selector<br>
&gt; With this change, binary selector can be arbitrarily composed of #verticalBar | #upArrow ^ or any other Character classified as #binary (See Scanner class&gt;&gt;initializeTypeTable)<br>
&gt;<br>
&gt; =============== Diff against Compiler-nice.279 ===============<br>
<br>
</div>So<br>
<br>
foo<br>
  | a |<br>
  a := 1 + 3<br>
  ^ a.<br>
<br>
actually means<br>
<br>
foo<br>
  | a |<br>
  a := 1 + 3 ^ a.<br>
  ^ self.<br>
<br>
Which might be surprising - currently the former will fail with a<br>
sensible error message. (I say this while liking that I can write &quot;2 ^<br>
2&quot; instead of &quot;2 squared&quot;...)<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Yep, this is the objection that I anticipated in my first annoucement.<br></div><div>Note that the format is clearly expressing the intention, that makes me think that the Python&#39;s interpretation of formating is not that bad ;) but we ain&#39;t gonna change that...<br>
<br></div><div>If #&#39;^&#39; is not a Symbol, then you&#39;ll get a warning that you used a new selector.<br></div><div>I don&#39;t remember, are all 1 char Symbol still interned, or did we change that?<br></div><div>Of course, once you implement ^ as a binary message, then the code is accepted as is without any sort of warning...<br>
<br></div><div>It&#39;s the same for self which is interpreted as a message send in this code:<br></div><div>    x := 1 + self foo<br></div><div>    self bar: x.<br></div><div>It warn once, at first self send, but then, #self is interned and you&#39;re never warned again...<br>
<br></div><div>For this sort of error, we could have a kind of lint rule for checking indentation : a single tab after a cr should match a beginning of a new statement (same with proper indentation inside blocks)<br><br></div>
<div> Nicolas<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
frank<br>
<br>
</font></span></blockquote></div><br></div></div>