title: Objective C: Differentiating iVars and Accessors
body: <pre><code> @interface RandomObject : NSObject
   {
    NSString* someObject; // I know I don't have to explicitly declare. Just to clarify my point. 
   }
   @property (nonatomic, strong) NSString *someObject;
   @end
  
   @implementation RandomObject 
   @synthesize someObject;
   @end
  </code></pre>
  
  <p>Given the code above and Xcode 4.3 is used (hence, no auto-synthesizing), here is my question.</p>
  
  <p>The property/synthesize will create accessors for someObject, namely getter and setter. So if I want to assign a value to someObject, I can do this.</p>
  
  <pre><code> self.someObject = @"Tomato"; // [self setSomeObject: @"Tomato"];
  </code></pre>
  
  <p>If my understanding is correct, self will send @"Tomato" to setSomeObject method. But what if you do this?</p>
  
  <pre><code> someObject = @"Tomato"; // or maybe _someObject = @"Tomato" if you are doing auto-synthesizing
  </code></pre>
  
  <p>Directly accessing an iVar object seems like a bad idea, but since someObject is a private variable, within the same class you have access to that, right? </p>
  
  <p>I understand why you would need to use self.someOject if you want to manipulate someObject from another class. But why is it that you'd need to do the same even though you are still in the same class. Why is it that it's a bad idea to directly access iVar. </p>