Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: if else and not reachable coding style

by dokkeldepper (Friar)
on Mar 09, 2006 at 09:03 UTC ( [id://535353]=note: print w/replies, xml ) Need Help??


in reply to if else and not reachable coding style

Although there are a lot of answers already, an important point is missing: Gernerally speaking, your question is not a question of style. It is a question of logic and should be guided by the imperative:

Be explicit!

Let's assume that COND is (COND A or COND B). Then, what is the proper meaning of else? (ok, that was purely rhetorical.)

In other words, except for the most trivial CONDs I would always use the most explicit form, even dispatch tables.

  • Comment on Re: if else and not reachable coding style

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-16 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found