> If you do it as scalar only. You lose a lot of useful possiblities.
This is indisputable.
> Why do you mind having an attribute?
The problem would seem to be that an lvalue subroutine might return
either an array or a scalar, depending on its arguments. That *can't*
be resolved at compile-time, no matter how many attributes we give it.
> Is there anyting in perl that defines the order of evaluation?
Yes. Try this:
$hash{<>} = <>;
RHS always evaluates first.
I'm not sure how critical that rule is though, especially if
"assignment to subroutine return value" were a special case.
Damian
- Re: RFC 132 (v1) subroutines should be able... Johan Vromans
- Re: RFC 132 (v1) subroutines should be ... Nathan Torkington
- Re: RFC 132 (v1) subroutines shoul... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able... Damian Conway
- Re: RFC 132 (v1) subroutines should be ... Johan Vromans
- Re: RFC 132 (v1) subroutines shoul... Chaim Frenkel
- Re: RFC 132 (v1) subroutines s... Johan Vromans
- Re: RFC 132 (v1) subroutines s... Chaim Frenkel
- Re: RFC 132 (v1) subroutines s... Johan Vromans
- Re: RFC 132 (v1) subroutines s... Chaim Frenkel
- Re: RFC 132 (v1) subroutines shoul... Damian Conway
- Re: RFC 132 (v1) subroutines should be able to retu... David L. Nicol
- Re: RFC 132 (v1) subroutines should be able to return an... David L. Nicol
- Re: RFC 132 (v1) subroutines should be able to retu... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able to ... Tom Christiansen
