Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Practical example of "Is Perl code maintainable" (golf)

by eyepopslikeamosquito (Chancellor)
on Aug 13, 2007 at 21:14 UTC ( #632316=note: print w/replies, xml ) Need Help??

in reply to Re: Practical example of "Is Perl code maintainable" (golf)
in thread Practical example of "Is Perl code maintainable"

my( $dev, $ino, $mode )= stat( _ ); return $mode; }
I disagree with introducing the $dev and $ino variables here, given that they are not being used. Many languages will throw a "variable is initialized but never used" warning if you do that sort of thing. Apart from that, I feel it makes maintenance harder because the maintenance programmer has more variables to visually digest ... and then perhaps ponder why they are not being used. For similar reasons, I dislike capturing parens in regexes when the captured values are not being used; I find myself visually checking the code for $1, $2, ..., wondering if I've missed something.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632316]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2016-10-27 12:13 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (362 votes). Check out past polls.