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

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
From:
Aaron Priven
Date:
February 26, 2013 23:28
Subject:
Re: Salvaging lexical $_ from deprecation
Message ID:
7BBFEE28-3205-43D1-885F-321DCDD0F617@priven.com
Your point on the importance of reading code is well taken, but it makes no difference to the rest of my argument whether it is reading or writing that is key. 

-- 
Aaron Priven, aaron@priven.com

On Feb 26, 2013, at 2:03 PM, Rafael Garcia-Suarez <rgs@consttype.org> wrote:

> 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