Think about the possiblity that flattening shouldn't be the default.
So that to get the flattening effect one would have to specify it
(or use @_ which would do the work.)
So perhaps an attribute
sub bar ($first, @rest :rest) { ... }
Then an introspective sub may be able to infer what was actually
sent on the stack.
It may be an overall win, by not flattening. It may make the work
for -internals easier. I can see it helping Damian's lazy evaluation
proposal.
<chaim>
>>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
PRL> Here are two more examples specifying a scalar followed by an
PRL> array/hash array to gobble up all remaining arguments.
PRL> sub bar ($first, @rest) {
PRL> ... # my ($first, @rest) = @_;
PRL> }
PRL> sub baz ($first, %rest) {
PRL> ... # my ($first, %rest) = @_;
PRL> }
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183
- RFC 57 (v1) Subroutine prototypes and parameters Perl6 RFC Librarian
- Re: RFC 57 (v1) Subroutine prototypes and paramet... Jonathan Scott Duff
- Re: RFC 57 (v1) Subroutine prototypes and par... Jacob Davies
- Re: RFC 57 (v1) Subroutine prototypes and... Bart Lateur
- Re: RFC 57 (v1) Subroutine prototypes and paramet... Bart Lateur
- Re: RFC 57 (v1) Subroutine prototypes and par... Chaim Frenkel
- Re: RFC 57 (v1) Subroutine prototypes and paramet... Chaim Frenkel
- Re: RFC 57 (v1) Subroutine prototypes and paramet... Piers Cawley
- Re: RFC 57 (v1) Subroutine prototypes and par... Piers Cawley
- Re: RFC 57 (v1) Subroutine prototypes and paramet... Damian Conway
- Re: RFC 57 (v1) Subroutine prototypes and par... Bart Lateur
- Re: RFC 57 (v1) Subroutine prototypes and... Jacob Davies
- Re: RFC 57 (v1) Subroutine prototypes... Bart Lateur
- Re: RFC 57 (v1) Subroutine proto... Nathan Wiger
- Re: RFC 57 (v1) Subroutine p... Andy Wardley
- Re: RFC 57 (v1) Subrouti... Bart Lateur
- Re: RFC 57 (v1) Subrouti... Andy Wardley
