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
  • 3775
  • 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.

Java Performance Optimization
Written by: Pierre-Hugues Charbonneau
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. Java EE7
  5. HTML5 Mobile
  1. Node.js
  2. Debugging JavaScript
  3. OO JS
  4. JSON
  5. Ajax