logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Auto My?: msg#00235

Subject: Re: Auto My?
On Sun, 2004-12-19 at 20:25 -0600, Rod Adams wrote:

> One of the other reasons in favor of the idea was aesthetic.
> 
> # stuff which declares $x, $z, and $q
> 
> $x = 4;
> my $y = 7;
> $z = 12;
> my $r = 4543;
> $q = 121;
> 
> compared to:
> 
> # stuff which declares $x, $z, and $q
> 
> $x = 4;
> $y = 7;
> $z = 12;
> $r = 4543;
> $q = 121;
> 
> With a fixed width font, like all code editors use, all the =' like up, 
> and I can quickly scan the var names to get to the one I want to change 
> at that moment.

If you align the equals signs yourself with spaces, you can use variable
names of different lengths (and possibly improved meaningfulness in
actual factual code) too.

I'm only half-joking.  Vertical alignment makes a dramatic difference to
readability.

-- c




<Prev in Thread] Current Thread [Next in Thread>