Front page | perl.perl5.porters |
Postings from November 2017
Re: square signatures
Thread Previous
|
Thread Next
From:
Zefram
Date:
November 15, 2017 15:01
Subject:
Re: square signatures
Message ID:
20171115150125.GO4913@fysh.org
demerphq wrote:
>Can we make the prototype part be in square brackets?
In signature-syntax mode we technically could add back a short prototype
syntax using square brackets, but it would sow even more confusion, by
making the same thing (prototypes) look different in nearly the same
context. It's the converse of the confusion that arises from making
different things look similar. What do you hope to achieve? Is there
a pressing need for short prototype syntax in signature-syntax mode?
Outside signature-syntax mode, it's out of the question to change
prototype syntax. The short syntax with parens is the only way for pure
Perl code to establish prototypes that's portable any earlier than 5.20
(which is when the :prototype attribute was added).
>Possibly version
>controlled so that old code keeps working, but new code always treats
>the parens as being signature definitions?
You're describing putting the signatures feature into a version feature
bundle. That's entirely possible once signatures are stable, but has
no bearing on questions of what the syntax in signature-syntax mode
should be.
Thread Previous
|
Thread Next