develooper Front page | perl.perl5.porters | Postings from February 2015

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

Thread Previous | Thread Next
Leon Timmermans
February 24, 2015 17:31
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
On Tue, Feb 24, 2015 at 5:43 PM, Zefram <> wrote:

> wrote:
> >The syntax 'sub foo :attributes ($signature) { ... }' is awful. It
> >should be 'sub foo($signature) :attributes { ... }'. (This might be a
> >candidate for bug #121481.)
> I do not approve of this change.  It gives the misleading impression
> that the signature is metadata that could reasonably be examined by
> distant code.  I believe the request for this change comes largely from
> people misunderstanding signatures in precisely that manner.

No, to me it's an end-weight issue. I want the most important things
furthest to the left, and to me *as a human reader* the signature is almost
always more important than the attributies. It's the difference between "I
have to tell you who the murderer is...<bang>" and "Steve done it! <bang>".
Making it easier for the end-user to read the code is far more important
than implementation details that most users wont even think about.

To me, this is a very perlish thing to do.


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