develooper Front page | perl.perl5.porters | Postings from November 2017

Re: square signatures

Thread Previous | Thread Next
Ryan Voots
November 15, 2017 02:22
Re: square signatures
Message ID:
On Mon, Nov 13, 2017 at 12:07 PM, Zefram <> 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
Fun, Kavorka, signatures, Sub::Signatures, Filter::Signatures,
Type::Tiny::Signatures, Parse::Method::Signatures, Perl6::Signatures,
Method::Signatures::WithDocumentation, Method::Signatures::PP, and
Also probably a lot of other modules that I missed.

Ryan Voots

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