<div dir="ltr"><div><div>Anyway you can&#39;t cover much, storeString is very very limited to a few core objects.<br></div>Even for the most simple objetcs, precedence is broken, just try 1-&gt;(1-&gt;2).<br></div><div>For Pharo, I made a utility based on generating AST and then printing it, which work a bit further for simple objects.<br>
<br>See SLICE-Issue-4943--Implement-printSelfEvaluating-with-AST-nice.3.mcz<br></div><div>In <a href="http://ss3.gemstone.com/ss/PharoTreatedInbox.html">http://ss3.gemstone.com/ss/PharoTreatedInbox.html</a><br></div><div>
<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 19:48, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt; wrote:<br>
&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; I like how your comment describes _why_ the change rather than what<br>
&gt;&gt; the change, since what would be redundant with the code.<br>
&gt;&gt;<br>
&gt;&gt; But it also gave me an idea -- whether it would be good to only space<br>
&gt;&gt; it out if it must; e.g., if key and/or value are binary selectors.<br>
&gt;&gt; Otherwise, maintian the traditional compact print.<br>
&gt;&gt;<br>
&gt;&gt; I have an app that makes heavy use of user-specified Arrays of<br>
&gt;&gt; Associations for parameterizing objects, which may be using their<br>
&gt;&gt; printString output.  Unless you&#39;d like to take the above suggestion,<br>
&gt;&gt; I&#39;d like to run with this for a couple of weeks, see how things look,<br>
&gt;&gt; before trunking it.  (A new verbification for you Tim!).<br>
&gt;<br>
&gt; I&#39;d be happy to get the compact form back: I hemmed and hawed over<br>
&gt; whether or not to do it, hence asking for, well, not _consensus_, but<br>
&gt; sanity.<br>
<br>
</div>As it happens, this commit breaks two tests. Chris, one possible way<br>
for getting the compact form back is to say something like<br>
<br>
storeOn: aStream<br>
    | arrow |<br>
    arrow := key isBinarySelector ifTrue: [&#39; -&gt; &#39;] ifFalse: [&#39;-&gt;&#39;].<br>
    key storeOn: aStream.<br>
    aStream nextPutAll: arrow.<br>
    value storeOn: aStream<br>
<br>
and similarly for #printOn:.<br>
<br>
I dislike the conditional; I&#39;m not _certain_ that it&#39;s sufficient to<br>
cover all the cases, and conditionals are always ugly.<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; frank<br>
&gt;<br>
&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; wrote:<br>
&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; Frank Shearar uploaded a new version of Collections to project The Inbox:<br>
&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;<br>
&gt;&gt;&gt;&gt; ==================== Summary ====================<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Name: Collections-fbs.516<br>
&gt;&gt;&gt;&gt; Author: fbs<br>
&gt;&gt;&gt;&gt; Time: 1 May 2013, 10:14:23.588 pm<br>
&gt;&gt;&gt;&gt; UUID: e787006a-d096-47f3-93da-c4681285fae2<br>
&gt;&gt;&gt;&gt; Ancestors: Collections-ul.515<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Surrounding the -&gt; in an Assocation in printed form allows the left side to be a binary selector without things breaking: #* -&gt; #+ otherwise prints as &#39;#*-&gt;#+&#39;, which is the Symbol #*-&gt; followed by garbage.<br>

&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; =============== Diff against Collections-ul.515 ===============<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Just to be clear, you&#39;re +1&#39;ing this change, Nicolas?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (I didn&#39;t add tests for the Association &gt;&gt; #printString; I&#39;ll<br>
&gt;&gt;&gt; understand if you demand these!)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; frank<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
<br>
</div></div></blockquote></div><br></div>