[squeak-dev] terse Object concatenation

Igor Stasenko siguctua at gmail.com
Mon Sep 20 01:08:27 UTC 2010


yeah,
i think it is the case, when writing less terse:

{ obj1. obj2 }

instead of
obj1 , obj2

is more preferable, since in case of using {} , obj1 and obj2 can be
anything i like
(including collections) and i don't have to expect any surprises from that.

On 20 September 2010 02:27, Wolfgang Eder <edw at generalmagic.at> wrote:
> dear chris,
> i believe that this is not possible to do in a consistent manner,
> because:
> string , string means string concatenation
> object , object means collection creation
>
> so it is not obvious (to me at least) what
> string , object
> object , string
> should actually do.
>
> and then there's the fact that strings are
> collections too, so
> string , $c
> $c , string
> have yet another set of possible meanings.
>
> just my 2c
> thanks
> wolfgang
>
> On 19.09.2010 22:53, Chris Muller wrote:
>>
>> I would like to integrate this elegant extension to the
>> object-concatenation API.  Just as Exceptions may be easily
>> concatenated with the #, (comma) selector, now any object may, as
>> well:
>>
>>   object1, object2  -->  "{ object1.  object2 }"
>>
>> and, equally, with other collections:
>>
>>   { object1.  object2 }, object3 -->  "{ object1.  object2. object3 }"
>>
>> I find this particularly useful for user-interfaces that apply
>> Smalltalk interpretation to user text input, that the user was able to
>> write "lists" of items in a very terse and natural way rather than
>> demanding curly-brace developer-syntax.
>>
>> I do not wish to reopen philosophical discussions; this is right
>> in-line with the spirit of Squeak's other concatenation conveniences.
>> There were no major objections when I proposed this a couple of months
>> ago, and if that is still true, I would therefore like to go ahead and
>> merge these 5 new methods into the trunk later this week.
>>
>>  - Chris
>>
>>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list