[jboss-dev] Weird boolean expressions

Jason T. Greene jason.greene at redhat.com
Fri Feb 19 12:24:36 EST 2010


Yeah that drives me batty. Especially when someone breaks my beautiful 
k-map optimized expressions ;) Luckily that hasn't happened lately.

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


-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-development mailing list