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

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

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
February 25, 2015 03:35
Subject:
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
20150225033515.GB85291@plasmasturm.org
* Zefram <zefram@fysh.org> [2015-02-24 17:45]:
> 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.

I believe you are mistakenly deriving Ought from Is here. Sure, it *is*
not currently metadata in such a way, but that is not an argument either
way about whether it *ought* to be such metadata.

> > It's also what perl itself does in C. :-)
> >
> >   OP* Perl_newDEFSVOP(pTHX) __attribute__((warn_unused_result));
>
> Utterly irrelevant, because of fundamental differences between the two
> languages. […] Ultimately, gcc's placement of the attribute clause in
> the syntax is an arbitrary choice.

Perl itself is Larry’s thesis that both claims that you are making here
about language design are wrong. (That mathematical/logical consistency
has primacy and that all remaining choices are axiomatically arbitrary.)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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