Front page | perl.perl5.porters |
Postings from August 2021
From: Ricardo Signes
August 15, 2021 01:57
Message ID: email@example.com
On Sat, Aug 14, 2021, at 9:32 PM, Philip R Brenan wrote:
> Please avoid twigils. They are quasi operators. As operators they ought to be optional.
It is unclear what you mean by this. Twigils are not operators. (While there may have been an argument to have been made in the days of Perl v3 that sigils were operators, it ceased to hold water in Perl v5, when lexical variables eliminated the necessity of a glob in a symbol table.) Twigils are syntactic extras in the name of a variable that constrain it in some way. The dollar sign means it will be a scalar. The at sign, an array. Ruby uses sigils, of a sort, in a similar way, but largely to indicate scope. Twigils could allow multiple constraints to be applied at once.
But at any rate, do you mean that all operators should be optional? Writing a program without operators is not something to be attempted in Perl 5 for any reason other than stunt programming.