[squeak-dev] The Inbox: Collections-fbs.516.mcz

Chris Muller asqueaker at gmail.com
Thu May 2 20:05:54 UTC 2013


I'll just try what you have now over the next weeks and see how it
goes.  We can always refine later.

On Thu, May 2, 2013 at 2:54 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 2 May 2013 19:48, Frank Shearar <frank.shearar at gmail.com> wrote:
>> On 2 May 2013 19:15, Chris Muller <asqueaker at gmail.com> wrote:
>>> I like how your comment describes _why_ the change rather than what
>>> the change, since what would be redundant with the code.
>>>
>>> But it also gave me an idea -- whether it would be good to only space
>>> it out if it must; e.g., if key and/or value are binary selectors.
>>> Otherwise, maintian the traditional compact print.
>>>
>>> I have an app that makes heavy use of user-specified Arrays of
>>> Associations for parameterizing objects, which may be using their
>>> printString output.  Unless you'd like to take the above suggestion,
>>> I'd like to run with this for a couple of weeks, see how things look,
>>> before trunking it.  (A new verbification for you Tim!).
>>
>> I'd be happy to get the compact form back: I hemmed and hawed over
>> whether or not to do it, hence asking for, well, not _consensus_, but
>> sanity.
>
> As it happens, this commit breaks two tests. Chris, one possible way
> for getting the compact form back is to say something like
>
> storeOn: aStream
>     | arrow |
>     arrow := key isBinarySelector ifTrue: [' -> '] ifFalse: ['->'].
>     key storeOn: aStream.
>     aStream nextPutAll: arrow.
>     value storeOn: aStream
>
> and similarly for #printOn:.
>
> I dislike the conditional; I'm not _certain_ that it's sufficient to
> cover all the cases, and conditionals are always ugly.
>
> frank
>
>> frank
>>
>>> On Thu, May 2, 2013 at 3:46 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>>>> On 1 May 2013 22:14,  <commits at source.squeak.org> wrote:
>>>>> Frank Shearar uploaded a new version of Collections to project The Inbox:
>>>>> http://source.squeak.org/inbox/Collections-fbs.516.mcz
>>>>>
>>>>> ==================== Summary ====================
>>>>>
>>>>> Name: Collections-fbs.516
>>>>> Author: fbs
>>>>> Time: 1 May 2013, 10:14:23.588 pm
>>>>> UUID: e787006a-d096-47f3-93da-c4681285fae2
>>>>> Ancestors: Collections-ul.515
>>>>>
>>>>> Surrounding the -> in an Assocation in printed form allows the left side to be a binary selector without things breaking: #* -> #+ otherwise prints as '#*->#+', which is the Symbol #*-> followed by garbage.
>>>>>
>>>>> =============== Diff against Collections-ul.515 ===============
>>>>
>>>> Just to be clear, you're +1'ing this change, Nicolas?
>>>>
>>>> (I didn't add tests for the Association >> #printString; I'll
>>>> understand if you demand these!)
>>>>
>>>> frank
>>>>
>>>
>


More information about the Squeak-dev mailing list