Link Details

Link 53170 thumbnail
User 111696 avatar

By bloid
via jroller.com
Published: Nov 15 2007 / 16:55

I'm serious! Boolean parameters can be evil because they don't communicate their purpose (or make it harder to understand the purpose of the methods using them.) The problem isn't really understanding a method signature. After all, we can give the boolean parameter a decent name and we can also add a Javadoc comment. For example
  • 38
  • 3
  • 3798
  • 2

Comments

Add your comment
User 231279 avatar

wanghy replied ago:

0 votes Vote down Vote up Reply

In IE, the dzone widget in the blog post shows "3 votes down" and in FireFox "3 votes up"...there might be a bug in the dzone widget

User 209464 avatar

willcode4beer replied ago:

0 votes Vote down Vote up Reply

the comments in this one are worth the read

User 169096 avatar

fijimf replied ago:

-3 votes Vote down Vote up Reply

The comments are not worth a read. Nor is the post. Really.

User 134694 avatar

alruiz15 replied ago:

0 votes Vote down Vote up Reply

Wouldn't it be helpful to know why the post and/or the comments are not worth a read?

User 189024 avatar

kieronwilkinson replied ago:

0 votes Vote down Vote up Reply

The article makes an excellent point. A nice simple solution for better code readablity.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java