[ANSI-Smalltalk] Protocol extensions - Object
Richard A. O'Keefe
ok at cs.otago.ac.nz
Tue Sep 9 02:10:16 BST 2008
[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.)
More information about the ANSI-Smalltalk
mailing list