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

Re: [perl #132760] Blead Breaks CPAN: YANICK/List-Lazy-0.3.0.tar.gz

Thread Previous | Thread Next
Dave Mitchell
February 20, 2018 16:14
Re: [perl #132760] Blead Breaks CPAN: YANICK/List-Lazy-0.3.0.tar.gz
Message ID:
On Mon, Feb 19, 2018 at 07:44:49AM +0000, Nicholas Clark wrote:
[snip lots of stuff about attr and sig order]

The more I think about this, the more I think that attributes should
be allowed in *either* position, with a warning or croak for specific
attributes found in the "wrong" location: currently just :lvalue,
but potentially other attributes added later that could affect the
signature etc.

This has the following advantages:

1) It allows :lvalue (and any future attributes) to be put in the
correct place.

2) It allows current and future code using signatures to run on perls back
as far as 5.22.0 (assuming that basic signatures don't change radically
between now and whenever they stop being experimental).

In particular it will allow the relatively common idiom of
    sub foo (....) :prototype(...) { ... }
to work in future and as far back as 5.22.0.

3) It doesn't need any fragile hacks like disallowing 'return' within
default signature code.

I'm prepared to implement this if a consensus is reached (although I
suspect it may be slightly tricky).

Standards (n). Battle insignia or tribal totems.

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