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

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

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
February 24, 2015 17:31
Subject:
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
CAHhgV8hX4L8RmccouiK2+vj1i3pb5F9UnLZ5MeuoCeEN=ki_gA@mail.gmail.com
On Tue, Feb 24, 2015 at 5:43 PM, Zefram <zefram@fysh.org> wrote:

> l.mai@web.de 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.

Leon

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