develooper Front page | perl.perl5.porters | Postings from July 2011

Re: Why views are useful, and why their syntax doesn't matter much

Thread Previous | Thread Next
From:
Reverend Chip
Date:
July 13, 2011 14:46
Subject:
Re: Why views are useful, and why their syntax doesn't matter much
Message ID:
4E1E1238.1040905@gmail.com
On 7/11/2011 5:53 AM, Nicholas Clark wrote:
> On Sun, Jul 10, 2011 at 01:41:41PM -0700, Reverend Chip wrote:
>
>> The no-common-vars optimization works strictly by name?  Feh.  Perhaps
>> you're right about the pragma, or perhaps we can just have users use do
>> BLOCK as a workaround since it makes temp copies that can have their
>> contents stolen, reducing the waste:
>>
>>     ($original,$something_else) = do { 3,$v };
> I suspect that it can be detected and dealt with at runtime without users
> needing to know, much like Dave managed with acdea6f060081615 for a related
> issue with list assignment.

Obviously this is possible, but do we want every list assignment to have
to build a hash table of SV* values?  I would prefer to avoid the
overhead in the overwhelmingly common case.


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