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

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

Thread Previous | Thread Next
December 9, 2014 20:21
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About