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:22
Subject:
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
20150225032238.GA85291@plasmasturm.org
* Ricardo Signes <perl.p5p@rjbs.manxome.org> [2015-02-24 18:45]:
> * Zefram <zefram@fysh.org> [2015-02-24T12:37:26]
> > That the signature is part of the body is not an implementation
> > detail, it is fundamental to the definition of signatures.
>
> As far as the programmer who is writing a subroutine with a signature
> is concerned, how is this relevant, let alone fundamental?

There is exactly one actual point of relevance: forward declarations.

You can’t put a signature on one of those.

At least, last we discussed what to do, there was a can of worms in the
question of what each combination of absence vs presence of a signature
in the forward declaration vs the actual sub could mean, particularly in
light of pre-existing code.

It was this consideration that made me think and argue, at that time,
that signatures ought to come after attributes.

In retrospect, that just violates expectation – even my own! – too much.

So this point of contradiction will require some other resolution. And
maybe it’ll be ugly, with special-casey behaviour instead of a nice,
coherent inner logic, but I now believe that price has to be paid.

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

Gruß,

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