[jboss-dev] Weird boolean expressions
David M. Lloyd
david.lloyd at redhat.com
Fri Feb 19 12:09:20 EST 2010
Every now and then I'll see a commit go by with code looking like this:
if (some.methodCall().foo() == false)
or
boolean something = Foo.bar() ? true : false
What is the point of these silly redundant expressions? This is beyond
code style and into the realm of superstition or something. We are all
professional programmers, and should have a thorough understanding of
boolean expressions at this point. Java is the common language that we all
speak - I don't think we need to dumb it down to this degree.
Everyone has their own preferences when it comes to formatting,
arrangement, even some coding techniques or patterns, but this is a bit
silly, wouldn't you say?
- DML
More information about the jboss-development
mailing list