develooper Front page | perl.perl6.language | Postings from March 2005

Re: Comma in (sub) traits?

Thread Previous | Thread Next
From:
Larry Wall
Date:
March 9, 2005 09:19
Subject:
Re: Comma in (sub) traits?
Message ID:
20050309171917.GC22973@wall.org
On Wed, Mar 09, 2005 at 09:13:27AM -0800, Larry Wall wrote:
:     sub foo ( Int $bar where { $_ == 0 } )    { ... }

Well, I'm not sure about that syntax.  It might have to be either

    sub foo ( Int where { $_ == 0 } $bar )    { ... }

or

    sub foo ( $bar of Int where { $_ == 0 } $bar )    { ... }

But if even I fall into that syntactic trap, maybe we'll end up allowing
it as a special DWIM case.

Larry

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