[squeak-dev] The Trunk: Kernel-cmm.819.mcz
Chris Muller
asqueaker at gmail.com
Thu Nov 7 16:32:50 UTC 2013
> Right. So you're actually saying that (MessageSend receiver: 1
> selector: #abs) numArgs == 0 instead of the correct 1. I agree. Sorry
> for the noise!
I have trouble understanding the above. 0 is the correct answer for
that example, not 1, but this change has no bearing on that example.
> (Of course you could also ^ arguments size + 1...)
Mmm, no. The idea here is that if a message selector Symbol such as
#at:put: has a numArgs of 2, and we create a MessageSend based on that
selector as in:
MessageSend
receiver: myDictionary
selector: #at:put:
then its numArgs better be 2, not 0.
MessageSends are sometimes used interchangeably with Blocks:
[ :key :value | myDictionary at: key put: value ]
because they're easier to serialize, but either one can be sent
#value:value: at some point in the future.
HTH.
> frank
>
>>> We have three proper constructors that create fully initialised
>>> MessageSends, so I'd rather hope (quite possibly in vain) that noone
>>> creates MessageSends through #new directly. It doesn't look like the
>>> base image does so.
>>
>
More information about the Squeak-dev
mailing list
|