[ANSI-Smalltalk] Protocol extensions - Object
Paolo Bonzini
bonzini at gnu.org
Tue Sep 9 06:38:02 BST 2008
>> 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.
Indeed. I don't remember if I already wrote this, but I looked up my
notes and it comes from Dolphin.
> 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.)
The Squeak image I have has both #sendTo: and #sentTo:, but the
implementation of #sendTo: is incomplet (it does not take into account
the lookupClass). GNU Smalltalk has #sendTo: *and* #perform: taking a
Message (I'm not extremely attached to the latter, but I agree that a
method to use in #doesNotUnderstand: should be there).
Paolo
More information about the ANSI-Smalltalk
mailing list