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