[self-interest] arguments and assignment

Steve Dekorte steve at dekorte.com
Tue May 1 20:42:24 UTC 2001


Toby Everett wrote:
> Why is perform:With:With:With: no longer acceptable?  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 sounds like a good idea to me. One of the common problems with 
keyword argument lists is handling variable number of arguments. Your 
scheme takes care of that. Lua uses a similar mechanism but does so but 
default on all functions. If you pass in more arguments than the 
function has declared argument variables for, it put the extras into a 
"args" array. This makes implementing message forwarding a lot simpler. 
It's also helpful to have a way to call a method with a list of 
arguments.

Steve



More information about the Self-interest mailing list