Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: Burned by precedence rules (not)

by gwadej (Chaplain)
on Dec 28, 2008 at 20:53 UTC ( #732927=note: print w/replies, xml ) Need Help??


in reply to Re^5: Burned by precedence rules (not)
in thread Burned by precedence rules

In my experience, the difference between if and unless has been less of a problem than overly complex conditional expressions. As you point out, adding a well-named function or variable that summarizes a series of tests is more important.

Since we've probably all seen these same kinds of confusions in languages that do not have an unless, it seems more reasonable to focus on clear conditionals rather than which keyword is used. If the conditional expression is clear enough, the code will be clear.

G. Wade

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://732927]
help
Chatterbox?
[atcroft]: .oO(Then again, you also have to be careful if you had it to the database, and be aware of any assumptions it makes (such as SQLite assuming Gregorian calendar and a day of exactly 86400 seconds)...)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-04-29 04:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.