On 21 Feb 2018 00:14, "Dave Mitchell" <davem@iabyn.com> wrote: 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). Before we say yes can you outline how one would mark an attribute as requiring LHS usage? YvesThread Previous | Thread Next