develooper Front page | perl.perl6.stdlib | Postings from August 2001

Re: Perl 6 modules plan

Thread Previous | Thread Next
From:
Graham Barr
Date:
August 13, 2001 23:51
Subject:
Re: Perl 6 modules plan
Message ID:
20010814075006.I7667@pobox.com
On Mon, Aug 13, 2001 at 04:38:43PM -0700, Nathan Wiger wrote:
> And allow flexible calling styles. For example, you might say:
> 
>    # import args() for argument validation
>    use Module::Interface qw/args/;
> 
>    sub my_func (@) {
>        my %args = args({ positional => [qw/name email phone/] }, @_);
>    }
> 
> Which would allow you to call your function two different ways:
> 
>    my_func($name, $email, $phone);
>    my_func(name => $name, email => $email, phone => $phone);

This is the king of thing that CGI does, and IMO is exactly what we don't want.

There should be ONE calling style for each sub/method. Allowing this _will_
cause different people to use different calling styles and also possible
confusion.

Graham.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About