About brackets and parenthesis
Damien Cassou
damien.cassou at laposte.net
Thu Aug 17 13:54:43 UTC 2006
Klaus D. Witzel wrote:
> On Thu, 17 Aug 2006 12:07:54 +0200, Damien Cassou wrote:
>> Klaus D. Witzel wrote:
>>> On Thu, 17 Aug 2006 11:12:36 +0200, Damien Cassou wrote:
>>>
>>>> test:=OrderedCollection with: 'first'.
>>>> test
>>>> add: 'second';
>>>> size negated
>>>>
>>> (test add: 'second'; size) negated is what you can do with the
>>> result of your cascaded messages.
>>
>> Maybe my example was not clear enough:
>
> No it was crystal clear.
>
>> test:= MyObjectModel
>> test
>> getAllChanges;
>> storageStrategy storeNow;
>> readyToContinue
>
> test
> getAllChanges;
> ifNotNil: [test storageStrategy storeNow];
> readyToContinue
>
> does not compile (lack of support from parser/compiler) but
>
> | test |
> test := nil.
> test
> yourself;
> ifNotNilDo: [:ignored | test yourself isNil];
> yourself
>
> does.
>
>> I think it is clear that #storeNow is sent to the result of 'test
>> storageStrategy'. And #readyToContinue should still be sent to 'test'
>
> See above, it is.
>
>> so brackets are not possible in this example.
>
> Brackets are but parentheses aren't, in your 2nd example.
Stop confusing me ;-) Just before writing the mail, I had a look at my
dictionary because I've never managed to know how those following
symbols are called in english:
() [] {}
My dictionary told me:
() brackets or parenthesis (for US)
[] square brackets
{} braces or curly brackets
When I said: 'so brackets are not possible in this example', I meant
parenthesis :-)
Two minutes ago, I verified in wikipedia and it seems that 'Bracket' is
the superclass of Parenthesis.
Which one is correct :-) ?
More information about the Squeak-dev
mailing list
|