in reply to if else and not reachable coding style
My tendency is to the first construct when COND is true or false based on an option contained in the argument list and the third when COND is true or false based on improper inputs, e.g., such as log(0) or on external factors (the network is down).
I find the second case unesthetic, as the die statement is, at best, superfluous. Indeed, I would not be surprised if Perl optimized it away.
emc
" When in doubt, use brute force." — Ken Thompson
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: if else and not reachable coding style
by Anonymous Monk on Mar 08, 2006 at 21:20 UTC |