[EMAIL PROTECTED] wrote:

Stuart Cook skribis 2005-10-10 22:58 (+1100):
 @args = (a => 1, get_overrides());
 foo([EMAIL PROTECTED]);
Not if you want that a=>1 to be a named argument.
Under the proposal, the only ways to pass a named argument are:
1) By using a literal pair in the syntactic top-level of the arg list
2) By splatting a pair, hash, or arg-list-object


I find this counterintuitive, and also want arrays to be included in
option 2.
How would you splat an array of pairs if you want to preserve the pairs?

It is consistent with the idea that * expands its RHS and evaluate it as
if it was written literally.

I'd like @_ or @?ARGS or something like that to be a *-able array that
will be guaranteed to be compatible with the current sub's signature.

This sounds nice, though. Maybe it suggests that the 'named splat' should be something other than *?

   Miro


Reply via email to