title: Objective-C - Is !!BOOL Beneficial
body: <p>I'm looking over the diffs submitted to a project by another developer, and they have a lot of code that does <code>!!&lt;some BOOL value&gt;</code>.  In fact, this seems to be their standard pattern for implementing boolean getters and setters.  They've implemented their code like:</p>
  
  <pre><code>- (BOOL) hasId {
      return !!hasId_;
  }
  - (void) setHasId:(BOOL) value {
      hasId_ = !!value;
  }
  </code></pre>
  
  <p>I've never seen this pattern before, and am wondering if there is any benefit in using it.  Is the double-negation doing anything useful?  </p>