Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes
[email protected] (Chaim Frenkel) 16 Aug 2000 18:36:37 -0400
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
During -internals discussions, we seem to have come up with, that the flattenting will not be required by the implementation. (It might actually be a win.) All arrays/lists would be actually have a single reference on the data stack. For backwards compatiblity, @_ would iterate of all arguments. But if a perl user level mechanism were made available then a routine that wishes to access the original unadulterated arguments would have it available. <chaim> >>>>> "PRL" == Perl6 RFC Librarian <[email protected]> writes: PRL> Subroutines may be called with multiple values. Lvalue subroutines PRL> may be assigned multiple values. Simple passing on the argument PRL> list conflates the two: PRL> foo(@args) = @rvalues; PRL> would be identical to: PRL> foo(@args, @rvalues); PRL> Perl's list flattening would prevent the subroutine from knowing where PRL> one began and the other ended. Better would be if the rvalue were PRL> passed as a last or first argument, making it equivalent to: -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183