On Mon, Aug 07, 2000 at 02:35:50PM -0000, Perl6 RFC Librarian wrote:
>     sub foo ($x, $y) {
>         ...
>     }
> 
> This would be equivalent to the Perl 5 construct:
> 
>     sub foo ($$) {
>       my ($x, $y) = @_;
>     }

This and 

> Default values could also be provided in subroutine prototypes.
> 
>     sub wiz ($first, $second, $third = 5, $fourth = 7) {
>       ...
>     }

this, yes.

The rest, I'm not so sure about.

> or instead with named parameters.  But how exactly?  One candidate for
> the calling convention would be:
> 
>     # common Perl 5 form, '=>' implies LHS is quoted
>     foo(x => 10, y => 20);

Just thinking out loud ...

foo(    $x:10,          $y:20           );
foo(    [ x => 10 ],    [ y => 20 ]     );
foo(    { x => 10, y => 20 }            );
foo(    $x'10,          $y'20           );      # Gone are the days of perl4
foo(    $x|10,          $y|20           );

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to