Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: if variants

by ihb (Deacon)
on Oct 20, 2004 at 01:01 UTC ( #400723=note: print w/ replies, xml ) Need Help??


in reply to if variants

Using parentheses, rather than relying on precedence, should be habit anyway for a good programmer.

I disagree! I disagree a lot! Knowing your precedence is a part of knowing the language. Sometimes, but just sometimes, adding parenthesis can add to clarity. Otherwise, I think they're just cluttering the code. You shouldn't put unnecessary "precedence parentheses" in Perl just as you don't do x + (y * z) when doing math. The desire to add parenthesis rather than to "rely on precedence" is usually a sign of uncertainty of the programmer who consequently does it "for safety". If you're not certain of the precedence for what you want to write, don't do yourself the disfavour of adding "safety parentheses", instead look in perlop. You'll soon learn the precedence well enough to not have to look there so often.

I found the node to be unnecessary hard to read. It would benefit from some editorial updates. It would be great to have paragraph titles. For the code that is on its own line it would be good to have it either indented or surrounded by blank lines, or preferably both. Adding code tags consistantly for all code parts in the text, including && and variable names, would also make it easier to read.

ihb

See perltoc if you don't know which perldoc to read!
Read argumentation in its context!


Comment on Re: if variants
Select or Download Code
Re^2: if variants
by apotheon (Deacon) on Oct 20, 2004 at 01:14 UTC
    I've taken your suggestions and comments under consideration, and made some edits. Thank you.

    - apotheon
    CopyWrite Chad Perrin

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-07-26 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls