Nathan Wiger writes:
>     sub somesub {
>         my(@stuff) = @_;
>         # do nothing
>     }
> 
> Then I think both of these should act exactly the same:
> 
>     somesub(@values);
>     somesub = @values;

EUGH.  No way!

Assignment should be used to reflect (get this) assignment.  Using
it as argument passing is disgusting.  I'm assuming you're not
*advocating* this, merely pointing out that it's a side-effect of
the RFC's suggested implementation.

> I know that's not how 5.6 works, but it's what the RFC says. See what
> I'm saying?

Yeah.  I think the RFC is wrong wrt how the lvalue subroutines get
their arguments.

If a subroutine can be passed a list of parameters, and can receive
any number of parameters via assignment, how do you tell them apart?
It's the same problem as:
  subcall(@a, @b);
You can't tell where @a stops and @b begins.  And you have to be able
to, because the values may be serving completely different roles
(keys into a database for @a, values stored there for @b).

The RFC should tackle this.

Nat

Reply via email to