<div dir="ltr"><div>Yes, what I mean is that we can live with simple hacks and don&#39;t need to worrry whether it can be generalized or not, because we already know the answer, it cannot in current form<br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/5/2 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="im">On 2 May 2013 21:18, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; Anyway you can&#39;t cover much, storeString is very very limited to a few core<br>
&gt; objects.<br>
&gt; Even for the most simple objetcs, precedence is broken, just try 1-&gt;(1-&gt;2).<br>
&gt; For Pharo, I made a utility based on generating AST and then printing it,<br>
&gt; which work a bit further for simple objects.<br>
&gt;<br>
&gt; See SLICE-Issue-4943--Implement-printSelfEvaluating-with-AST-nice.3.mcz<br>
<br>
</div>Agreed: the _proper_ solution is to work with ASTs. For the purpose of<br>
fixing the Trait issue, only the #printOn: part is vital. Excuse me<br>
while I boggle once again at that idea.<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; In <a href="http://ss3.gemstone.com/ss/PharoTreatedInbox.html" target="_blank">http://ss3.gemstone.com/ss/PharoTreatedInbox.html</a><br>
&gt; 2013/5/2 Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 2 May 2013 19:48, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; On 2 May 2013 19:15, Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; I like how your comment describes _why_ the change rather than what<br>
&gt;&gt; &gt;&gt; the change, since what would be redundant with the code.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; But it also gave me an idea -- whether it would be good to only space<br>
&gt;&gt; &gt;&gt; it out if it must; e.g., if key and/or value are binary selectors.<br>
&gt;&gt; &gt;&gt; Otherwise, maintian the traditional compact print.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I have an app that makes heavy use of user-specified Arrays of<br>
&gt;&gt; &gt;&gt; Associations for parameterizing objects, which may be using their<br>
&gt;&gt; &gt;&gt; printString output.  Unless you&#39;d like to take the above suggestion,<br>
&gt;&gt; &gt;&gt; I&#39;d like to run with this for a couple of weeks, see how things look,<br>
&gt;&gt; &gt;&gt; before trunking it.  (A new verbification for you Tim!).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;d be happy to get the compact form back: I hemmed and hawed over<br>
&gt;&gt; &gt; whether or not to do it, hence asking for, well, not _consensus_, but<br>
&gt;&gt; &gt; sanity.<br>
&gt;&gt;<br>
&gt;&gt; As it happens, this commit breaks two tests. Chris, one possible way<br>
&gt;&gt; for getting the compact form back is to say something like<br>
&gt;&gt;<br>
&gt;&gt; storeOn: aStream<br>
&gt;&gt;     | arrow |<br>
&gt;&gt;     arrow := key isBinarySelector ifTrue: [&#39; -&gt; &#39;] ifFalse: [&#39;-&gt;&#39;].<br>
&gt;&gt;     key storeOn: aStream.<br>
&gt;&gt;     aStream nextPutAll: arrow.<br>
&gt;&gt;     value storeOn: aStream<br>
&gt;&gt;<br>
&gt;&gt; and similarly for #printOn:.<br>
&gt;&gt;<br>
&gt;&gt; I dislike the conditional; I&#39;m not _certain_ that it&#39;s sufficient to<br>
&gt;&gt; cover all the cases, and conditionals are always ugly.<br>
&gt;&gt;<br>
&gt;&gt; frank<br>
&gt;&gt;<br>
&gt;&gt; &gt; frank<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; On Thu, May 2, 2013 at 3:46 AM, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; On 1 May 2013 22:14,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;&gt; Frank Shearar uploaded a new version of Collections to project The<br>
&gt;&gt; &gt;&gt;&gt;&gt; Inbox:<br>
&gt;&gt; &gt;&gt;&gt;&gt; <a href="http://source.squeak.org/inbox/Collections-fbs.516.mcz" target="_blank">http://source.squeak.org/inbox/Collections-fbs.516.mcz</a><br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; ==================== Summary ====================<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Name: Collections-fbs.516<br>
&gt;&gt; &gt;&gt;&gt;&gt; Author: fbs<br>
&gt;&gt; &gt;&gt;&gt;&gt; Time: 1 May 2013, 10:14:23.588 pm<br>
&gt;&gt; &gt;&gt;&gt;&gt; UUID: e787006a-d096-47f3-93da-c4681285fae2<br>
&gt;&gt; &gt;&gt;&gt;&gt; Ancestors: Collections-ul.515<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Surrounding the -&gt; in an Assocation in printed form allows the left<br>
&gt;&gt; &gt;&gt;&gt;&gt; side to be a binary selector without things breaking: #* -&gt; #+ otherwise<br>
&gt;&gt; &gt;&gt;&gt;&gt; prints as &#39;#*-&gt;#+&#39;, which is the Symbol #*-&gt; followed by garbage.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; =============== Diff against Collections-ul.515 ===============<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Just to be clear, you&#39;re +1&#39;ing this change, Nicolas?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; (I didn&#39;t add tests for the Association &gt;&gt; #printString; I&#39;ll<br>
&gt;&gt; &gt;&gt;&gt; understand if you demand these!)<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; frank<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>