title: Best way to define private variables in Objective-C
body: <p>I want to define private instance variables in MyClass.m file. It seems to me there are two ways to do it:</p>
  
  <ol>
  <li><p>use class extension</p>
  
  <pre><code>@interface HelloViewController ()
  {
       int value;
  }
  </code></pre></li>
  <li><p>define in @implementation section</p>
  
  <pre><code>@implementation HelloViewController
  {
      int value;
  }
  </code></pre></li>
  </ol>
  
  <p>Which is better?</p>
  
  <p>I think recent Apple's coding style is to use class extension?</p>
  
  <p>e.g. MasterViewController.m generated by 'Master-Detail Application Template' </p>
  
  <pre><code>@interface MasterViewController () {
      NSMutableArray *_objects;
  }
  @end
  </code></pre>