What's the convention for referring to selectors in messages?
Last updated at 8:35 am UTC on 15 January 2016
Question: What's the convention for referring a selector?
From: Bert Freudenberg Sent: Fri Dec 5, 2003 10:45 am
Actually, the convention is to use
"Object>>selector" without the hash mark. This can be verified by selecting ">>" and pressing Ctrl-E.
[You will see lots of messages formatted this way.]
In 1999 some guy [BF?] decided it would be neat if this was valid Smalltalk and added
#>> to class Behavior as a shortcut for
Of course, this requires you to use a Symbol as parameter, hence the #. So you can actually do a print-it on
"Morph>>#delete" in a workspace and the CompiledMethod for that method is returned.
#delete can be passed (a symbol), and
"Morph>>#delete" is a valid Smalltalk expression and
"Morph>>delete" is not.