Here, Dmitry, try this code in playground...maybe helps you understand
| lookupClosure |
lookupClosure := [].
lookupClosure := [:cls :selector |
(cls == nil)
ifTrue: [Warning signal: ('selector lookup failure: ', selector)].
(cls methodDictionary
at: selector
ifAbsent: [nil])
ifNil: [lookupClosure value: cls superclass value: selector]
ifNotNil: [:meth | Smalltalk tools browser openOnMethod:
meth]].
lookupClosure value: Array value: #at:put:.
On 10/16/2016 8:27 AM, CodeDmitry wrote:
I define Magic as "An opaque abstraction or an abstraction you think is
opaque until you learn better.", to a beginner, everything is deeply
Magical.
That said, much of Smalltalk's opaqueness is not due to the language, but
due to me being a beginner. I'm sure there's a way to actually force sending
a message to a dictionary via something like dict['at:put:']('foo', 'bar')
but I am not familiar enough with Smalltalk to express it, so it feels like
the only way to send a message is via this multi-part message abstraction.
--
View this message in context:
http://forum.world.st/How-do-Smalltalk-disambiguate-messages-tp4918946p4918966.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.