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

[perl #123069] signature/attribute syntax is awful

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
February 24, 2015 18:12
Subject:
[perl #123069] signature/attribute syntax is awful
Message ID:
rt-4.0.18-16891-1424801535-1786.123069-15-0@perl.org
On Tue Feb 24 09:43:21 2015, perl.p5p@rjbs.manxome.org wrote:
> * 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?

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
https://rt.perl.org/Ticket/Display.html?id=123069

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