develooper Front page | perl.perl5.porters | Postings from August 2019

what would make a good (additional) infix aliases operator?

Thread Next
David Nicol
August 2, 2019 14:43
what would make a good (additional) infix aliases operator?
Message ID:
Imagining an infix operator with syntax and precedence the same as = but it
does aliasing instead of value assignment.

What would be a good character sequence for this? := perhaps? := is
assignment in some languages, and isn't meaningful in Perl.

Or maybe an infix aliasing operator could be another letter that is used
with the binding operator?

     my $new_alias := $scalar;   # newbies will think this is assignment

     my $new_alias =~ a $scalar;   # ugly but clearly different

    \my $new_alias = \$scalar;  # this works now, right?

"Plant yourself like a tree beside the river of truth and tell the whole
world: No, you move."

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