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

Re: scoping functions as list operators?

Thread Previous | Thread Next
From:
Rod Adams
Date:
February 24, 2005 21:27
Subject:
Re: scoping functions as list operators?
Message ID:
421EB74E.10407@rodadams.net
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


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