develooper Front page | perl.perl5.porters | Postings from February 2013

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
From:
Eirik Berg Hanssen
Date:
February 20, 2013 16:12
Subject:
Re: Salvaging lexical $_ from deprecation
Message ID:
CAHAeAG4H=0frN7M2Nq14GLaF_5-6xhqCr3=43q2Ktm2P1xDr-Q@mail.gmail.com
On Wed, Feb 20, 2013 at 3:48 PM, Ruslan Zakirov <ruz@bestpractical.com>wrote:

> Also, this whole thread misses the fact that $a and $b used in sort
> fall into pretty much the same basket.
>

  I don't think I've formulated this before, but ...

  When I see C<< my $a >> or C<< my $b >>, I see a bug waiting to happen,
if not already happening.

  When I see C<< my $_ >>, I see a bug waiting to happen, or quite likely,
already happening.

  So much code, core and user, is expecting these variables to be globals.
Surprise that code at your own peril.


Eirik

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