develooper Front page | perl.perl5.porters | Postings from December 2008

Re: Proposal: Named parameters for 5.12

Thread Previous | Thread Next
From:
Tim Bunce
Date:
December 18, 2008 06:07
Subject:
Re: Proposal: Named parameters for 5.12
Message ID:
20081218140723.GC70688@timac.local
On Thu, Dec 18, 2008 at 10:55:38AM +0100, Johan Vromans wrote:
> Florian Ragwitz <rafl@debian.org> writes:
> 
> > http://search.cpan.org/~flora/signatures-0.02/lib/signatures.pm
> 
> Could this be enhanced to turn
> 
>    sub square ($num) : method { 
> 
> into
> 
>    sub square {
>      my ($self, $num) = @_;
>      
> (Although I'd prefer "method square ($num){" )

Either way, shouldn't we be aiming to match the syntax to the semantics
in a way that's consistent with Perl 6? In other words require "is copy":

     sub square ($num is copy) : method { 

(or  method square ($num is copy) { )

I think if we don't we'll be regretting it in a few years when perl5 and
perl6 are coexisting and perl6 will be running perl5 code. People will
be getting mighty confused.

Tim.

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