|Pathologically Eclectic Rubbish Lister|
Re^5: Burned by precedence rulesby tilly (Archbishop)
|on Dec 27, 2008 at 05:59 UTC||Need Help??|
Yes, it reads nicely. But if you're debugging and know the two values, you may be very surprised at what it does. By contrast in that mode you will reliably figure out what the if version does.
If you can easily run the code this is not so bad, But in my case I was debugging a failure in a batch job that failed after hours of work. In code I hadn't touched in months. Hence my failure to correctly figure out whether the conditional was executed lead to enough pain that I learned my lesson. The if version may not be pretty, but it is just as understandable when coding and a heck of a lot easier to debug. So use it.