Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by eyepopslikeamosquito (Canon)
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.


Comment on Re^2: Practical example of "Is Perl code maintainable" (golf)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-12-21 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (101 votes), past polls