develooper Front page | perl.perl5.porters | Postings from December 2008

Re: Proposal: Named parameters for 5.12

Thread Previous | Thread Next
Aristotle Pagaltzis
December 7, 2008 06:28
Re: Proposal: Named parameters for 5.12
Message ID:
* Chip Salzenberg <> [2008-12-06 01:45]:
> I have no reason to actively reject aliasing; it's a nice
> feature and, in the 'rw' case, it's a SMOP based on a couple of
> different CPAN modules. You should be aware, however, that
> _efficient_ _read-only_ aliasing - which is the Perl 6 default
> - may be a high-wire act in Perl 5's core. I would not be
> surprised if only 5.12 could support it.

Personally, I make use of read-write aliasing quite a bit – most
often not for direct manipulation of arguments in the sub itself,
but to pass on the alias-ness, eg. so I can guarantee that a
closure that’s also passed in will be able to mutate the other

I wouldn’t care much about ro aliasing. I guess it would be nice
as a defensive tool, but I can’t think of any case where it would
ever have helped me. I would care about efficient ro aliasing as
part of a COW scheme to speed up pass-by-value; but then it’d be
an implementation detail, not something surfaced in syntax.

Aristotle Pagaltzis // <>

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