[jboss-dev] Weird boolean expressions

Brian Stansberry brian.stansberry at redhat.com
Fri Feb 19 12:22:22 EST 2010


The former has nothing to do with understanding boolean expressions; 
it's simply to make the intent more visually obvious than a single ! 
packed in with a bunch of other syntax is.

The latter; yeah, that seems pretty silly.

On 02/19/2010 11:09 AM, David M. Lloyd wrote:
> 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
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development


-- 
Brian Stansberry
Lead, AS Clustering
JBoss by Red Hat



More information about the jboss-development mailing list