Front page | perl.perl5.porters |
Postings from November 2017
Re: square signatures
Thread Previous
|
Thread Next
From:
Father Chrysostomos
Date:
November 13, 2017 20:37
Subject:
Re: square signatures
Message ID:
20171113203729.3901.qmail@lists-nntp.develooper.com
Zefram:
> Under this arrangement we would see things like:
...
> sub mul ($$) [$x, $y] { $x * $y } # prototype and signature
I like this idea.
At first glance, though, I wonder what that array is doing there.
Since anonymous arrays are very common, and file globbing is rela-
tively rare, perhaps this would be a better syntax:
sub mul ($$) <$x, $y> { $x * $y }
Also, you never see file globbing that looks like <$a, $b>, so it is
hard to confuse them.
This should make code more skimmable.
> Let the opinions flow.
I will just add that I fully support putting attributes before signa-
tures, the way they used to be in 5.20.
Thread Previous
|
Thread Next