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

Re: Proposal: Named parameters for 5.12

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
December 7, 2008 06:28
Subject:
Re: Proposal: Named parameters for 5.12
Message ID:
20081207142817.GC3817@klangraum.plasmasturm.org
* Chip Salzenberg <chip@pobox.com> [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
arguments.

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.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About