title: Property vs. instance variable
body: <p>I'm trying to understand how strategies some folks use to distinguish instance vars vs. properties. A common pattern is the following:</p>
  
  <pre><code>@interface MyClass : NSObject {
      NSString *_myVar;
  }
  
  @property (nonatomic, retain) NSString *myVar;
  @end
  
  @implementation MyClass
  @synthesize myVar = _myVar;
  </code></pre>
  
  <p>Now, I thought the entire premise behind this strategy is so that one can easily distinguish the difference between an ivar and property. So, if I want to use the memory management inherited by a synthesized property, I'd use something such as:</p>
  
  <pre><code>myVar = @"Foo";
  </code></pre>
  
  <p>The other way would be referencing it via self.[ivar/property here]. </p>
  
  <p>The problem with using the @synthesize myVar = _myVar strategy, is I figured that writing code such as:</p>
  
  <pre><code>myVar = some_other_object; // doesn't work. 
  </code></pre>
  
  <p>The compiler complains that myVar is undeclared. Why is that the case?</p>
  
  <p>Thanks.</p>