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

Re: [perl #123069] signature/attribute syntax is awful

Thread Previous | Thread Next
From:
Abigail
Date:
December 9, 2014 20:21
Subject:
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
20141209202100.GA17929@almanda.fritz.box
On Tue, Dec 09, 2014 at 08:23:20AM -0500, Peter Martini wrote:
>
> +1 to moving signatures before attributes (and -1 to allowing it both
> ways).  I'll also note that having the signature after attributes leads to
> an unfortunate and unnecessary case of significant whitespace:
> 
> sub foo : attributes ($signature) {}  # signature of '$signature', and an
> attribute of 'attributes'
> sub foo : attributes($signature) {}   # no signature, and an attribute of
> 'attributes'
> 
> There's no such ambiguity if the signature is before the attributes


I had no opinion until you pointed out the significant whitespace
thingy. That would be horrible.



Abigail

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