develooper Front page | perl.perl6.language | Postings from February 2005

Re: scoping functions as list operators?

Thread Previous | Thread Next
Rod Adams
February 24, 2005 21:27
Re: scoping functions as list operators?
Message ID:
Luke Palmer wrote:

>Now we just need to determine if 'my' can leave its post as a unary declarator.
Don't see why not... If you ever need it unary, you can just put the () 
back in.

The question becomes which is more common:
Scoping a single variable in a list context, or scoping several 
variables at once. Likely the later.

This also reminds me of the thought someone had a while back about 
making = not copy in list context, making people use ==>/<== for all 
list assignments. It would certainly take care of the :

    $x, $y = $y, $x;

problem that will have people scratching their heads. (assuming that 
doesn't trigger a warning/error). Overall, I like the protection it 
provides, but dislike the extra three keystrokes it means for something 
I use so often.

-- Rod Adams

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