[ANSI-Smalltalk] Protocol extensions - Object

Paolo Bonzini bonzini at gnu.org
Mon Sep 8 20:19:49 BST 2008


Peter van Rooijen wrote:
> On Mon, 08 Sep 2008 09:21:32 +0200, Paolo Bonzini <bonzini at gnu.org> wrote:
> 
>> Richard A. O'Keefe wrote:
>>> On 8 Sep 2008, at 6:04 pm, Paolo Bonzini wrote:
>>>> Squeak overloads #perform: for a Message argument, see
>>>>
>>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-September/120697.html
>>>>
>>>>
>>>>
>>>> for an example.  What do you think about it?
>>>
>>> I think I can't find it in Squeak 3.10.
>>
>> I don't know -- the page I cited has
>>
>> RadioWrapper class >> doesNotUnderstand: aMessage
>>     "Handle messages that are not implemented on this wrapper by
>>      passing them to #subject"
>>     ^self subject class perform: aMessage.
>>
>> I looked in my notes and found that Dolphin was the one which originally
>> introduced this extension.
>>
>>> What Squeak _does_ have is Message sentTo: anObject,
>>> so
>>>     (Message selector: #+ argument: 2) sentTo: 1
>>>
>>> works.  Adding Message>>sentTo: does not raise that question.
>>> It does seem odd to have Messages with no direct way to send
>>> them, so adding #sentTo: would seem to make sense.
>>
>> Yes.  However, I'm reluctant on the naming.  Why #sentTo: and not
>> #sendTo:?
> 
> Paolo, just accept that Squeak is weird ;-).

I'd rather see incompatibility than weirdness in a standard. :-)

>> I've almost never seen a method named as a past participle,
>> and when I did, it returned a variation of the receiver, for example
>> #reversed or #sorted.
> 
> Uhh, isn't that #reverse (not #reversed)?

Aarghhhh!!!  (Anyway, having no past participle at all goes even more
against #sentTo:).

Paolo



More information about the ANSI-Smalltalk mailing list