develooper Front page | perl.perl6.language | Postings from May 2001

Re: 1 until defined(getvalue()); return it;

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
May 30, 2001 13:06
Subject:
Re: 1 until defined(getvalue()); return it;
Message ID:
20010530210642.H9430@blackrider.blackstar.co.uk
On Wed, May 30, 2001 at 02:54:27PM -0500, David L. Nicol wrote:
> small incremental improvement to [read|writ]ability
> 
> writability:
> 
> one less variable name to have to remember not to collide with

I think you have this one backwards.  This is one giant, ambiguous
global variable whose value and meaning changes constantly from
statement to statement.  Think $_ but worse.  You have to constantly
worry about adding in a new statement for fear it will alter the
meaning of $IT and break code below you.


> readability:
> 
> keyword "it" means look at very recent code, instead of starting
> at the top of the block and reading down to find what $foo
> is (trivially solvable by reading backwards...)

This is better solved by using smaller scopes/subroutines and
meaningful variable names.


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
Maybe they hooked you up with one of those ass-making magazines.
	-- brian d. foy as misheard by Michael G Schwern

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