Front page | perl.perl5.porters |
Postings from November 2017
Re: square signatures
Thread Previous
|
Thread Next
From:
Ryan Voots
Date:
November 15, 2017 02:22
Subject:
Re: square signatures
Message ID:
CA+sVJXnK4_6QCM7RDB86Eu0zbNHzwaGt6AneGmMttaPrEOZFBA@mail.gmail.com
On Mon, Nov 13, 2017 at 12:07 PM, Zefram <zefram@fysh.org> wrote:
> There is a change we could make to signature syntax, within the scope of
> the present experimental feature, which would have some value and which
> I think we should consider making. The change I propose is firstly that
> signatures should be delimited by square brackets instead of parentheses,
> and secondly that enabling signature syntax should not disable the short
> prototype syntax. Under this arrangement we would see things like:
>
>
The problem I see with this is that it goes against what I see the purpose
of signatures to be.
I wasn't involved with their original design but am a tentative user of
them. They're intended
to make Perl a bit less obscure and "just do the right thing" that new
users of the language
expect. In their current form they go a long way towards doing this, and
it's something that
a lot of people have been desiring and working towards. This is well
evidenced by the many
modules on CPAN that provide similar syntax as the current function
signatures:Function::Parameters,
Fun, Kavorka, signatures, Sub::Signatures, Filter::Signatures,
Method::Signatures,
Type::Tiny::Signatures, Parse::Method::Signatures, Perl6::Signatures,
MooseX::Signatures,
Method::Signatures::WithDocumentation, Method::Signatures::PP, and
Method::Signatures::Simple.
Also probably a lot of other modules that I missed.
Ryan Voots
Thread Previous
|
Thread Next