On Mon Oct 27 15:29:25 2014, mauke- wrote: > The syntax 'sub foo :attributes ($signature) { ... }' is awful. It > should be 'sub foo($signature) :attributes { ... }'. (This might be a > candidate for bug #121481.) > > Why? Because syntactically the signature replaces what used to be the > prototype, and that comes before attributes. Signatures are fundamentally different from prototypes because they affect solely the body of the subroutine, while prototypes affect callers. Thatâs why the attributes go next to the body. Currently a predeclaration would be the same as the sub declaration itself, except that the latter has more stuff on the end: sub foo :lvalue; sub foo :lvalue ($foo) {...} (Predeclarations are not allowed to have signatures, because they are part of the body.) So the way it works makes sense to me. But, ultimately, I donât care which way it goes. (Maybe even allow it both ways.) -- Father Chrysostomos --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=123069Thread Next