Austin Hastings wrote:

How about "perl should DWIM"? In this case, I'm with Juerd: splat should
pretend that my array is a series of args.

So if I say:

foo [EMAIL PROTECTED];

or if I say:

foo([EMAIL PROTECTED]);

I still mean the same thing: shuck the array and get those args out
here, even the pairs.

The trouble is, an array doesn't contain enough information:

Compare:
  foo( (a=>1), b=>2 );

With
  @args = ( (a=>1), b=>2 );
  foo( [EMAIL PROTECTED] );

If we have an arglist ctor, then we could have

  @args = arglist( (a=>1), b=>2 );
  foo( [EMAIL PROTECTED]);

  say @args.perl
## (
##   (a=>1) but is_positional,
##   (b=>2) but is_named,
## )


but without such a constructor, it would be difficult to DWIM correctly.

Of course, for the case of $?ARGS, constructing the array with appropriate properties wouldn't be a problem.

Reply via email to