Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Conditional style (if, &&) query

by rrwo (Friar)
on Oct 17, 2001 at 14:19 UTC ( [id://119350]=note: print w/replies, xml ) Need Help??


in reply to Conditional style (if, &&) query

I would say what is most readable has to do with the "flow of thought" as to what you're doing. Perl is an "expressive" language in that you can say the same thing many ways.

My rule of thumb: It's readable if a person with a decent knowledge of Perl who is going bleary eyed debugging the program for the last 12 hours can still make sense of the code and not mis-read it, and if the code is clear enough that it requires minimal comments.

I usually avoid short-circuit expressions because they are often easily misread.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-28 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found