[self-interest] arguments and assignment

Jecel Assumpcao Jr jecel at merlintec.com
Tue May 1 21:20:05 UTC 2001


On Tuesday 01 May 2001 02:27, Toby Everett wrote:
> Why is perform:With:With:With: no longer acceptable? 

Well, my proposal was to generate argument names automatically from the 
keyword parts, so they would have to be all different. 
'performSelector:Arg1:Arg2:Arg3:' would work, though I wanted to avoid 
such unimaginative names.

> Doesn't that
> really mean that with should receive an array of objects?  And really
> mean that it should be possible to say perform:[With]:, which would
> be interpreted by the system to automatically match perform:With: and
> perform:With:With: and perform:With:With:With: and so forth, with all
> of them getting assigned to the array with?

That would be interesting. Self doesn't have a syntax for array 
literals, so you have to write

                  ( 1 & 3 & 9 & 11 ) asVector

where in Smalltalk you would have

                 #(1 3 9 11)

and so we have methods with different selectors for small numbers of 
arguments. Some Smalltalks have a different syntax for when you need an 
array of generic expressions instead of literals. I thought we also had 
one more selector in Self for accepting an array of arguments, but it 
seems we don't. You can send at most 5 arguments to a block, for 
example, and have at most 2 arguments with the perform primitive.

Anyway, I looked through the list of 1600 unique argument names (out of 
a total of 22,000 argument slots) and don't think my idea would cause 
any great hardship (if you don't consider incompatibility with what we 
have now as such).

-- Jecel



More information about the Self-interest mailing list