[ANSI-Smalltalk] Protocol extensions - Object
Andres Valloud
andres.valloud at gmail.com
Thu Sep 25 10:29:33 BST 2008
I don't quite remember if I used to lean the sendTo: or sentTo: way,
but this discussion makes me think that sentTo: would imply that the
answer is the receiver (the message itself) after it's sent to
anObject. So now I am leaning towards sendTo:.
Andres.
On Mon, Sep 8, 2008 at 6:10 PM, Richard A. O'Keefe <ok at cs.otago.ac.nz> wrote:
> [About anObject perform: aMessage]
> On 8 Sep 2008, at 7:21 pm, Paolo Bonzini wrote:
>>
>> 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.
>
> Just because someone wrote that doesn't mean it ever worked.
> I checked every Squeak version I have back to 2.7 and this
> feature doesn't ever seem to have been in Squeak.
>>
>
>> Yes. However, I'm reluctant on the naming. Why #sentTo: and not
>> #sendTo:? 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.
>
> #raisedTo: is standard...
> #changed: is part of the traditional dependency protocol.
> A quick scan found a great many ...ed:... methods in VWNC5.
>
> I'd prefer #sendTo: myself, but if something isn't _too_ badly
> named, it's somewhat discourteous to rename it from existing
> practice. (I am still very upset that the ISO Prolog committee
> took the predicate name I invented before there WAS an ISO
> Prolog committee, atom_chars/2, and changed its meaning. It's
> certainly less offensive to give an old thing a new name than
> to give an old name an incompatible meaning, but with libraries
> as large as real Smalltalks, it may be unavoidable.)
>
>
>
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>
More information about the ANSI-Smalltalk
mailing list