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

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
February 26, 2013 22:03
Subject:
Re: Salvaging lexical $_ from deprecation
Message ID:
CAMoYMM-eKSO9UrD=+FSD-SmR7tnVoNSd=vHN6o9P8k6A6VXsRQ@mail.gmail.com
On 26 February 2013 02:23, Aaron Priven <aaron@priven.com> wrote:
> I wanted to say something about the lexical $_ debate, even though the
> conversation mostly stopped a week ago.
>
> $_ is useful only insofar as it avoids extra typing. There's no advantage
> over regular alphanumeric variables other than that.

Funnily enough, I seem to have answered preventively to that last week
on twitter:
https://twitter.com/consttype/status/303481243952115713
"The point of the $_ variable in Perl is not to avoid extra typing,
but extra reading."
(this based on the observation that code is much more often read than
written, and should be easier to read than to write.)

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