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

[perl #123069] signature/attribute syntax is awful

Thread Previous | Thread Next
Father Chrysostomos via RT
February 24, 2015 18:12
[perl #123069] signature/attribute syntax is awful
Message ID:
On Tue Feb 24 09:43:21 2015, wrote:
> * Zefram <> [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?

It affects what the body in between the {...} does.

I also find unconvincing the argument that putting the signature first makes it easier for programmers.  The signature directly affects the code that follows, so putting it right before it keeps related things closer.

There is a reason why Perl 6 changed s// ... 20 lines ... /m.


Father Chrysostomos

via perlbug:  queue: perl5 status: open

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