title: In objective-c, why 'typedef NSString * MyString' is preferred over 'typedef NSString MyString'?
body: <p>Option 1:
  <code>typedef NSString MyString</code></p>
  
  <p>Option 2:
  <code>typedef NSString * MyString</code></p>
  
  <hr>
  
  <h3>Question</h3>
  
  <p>In Objective-C, both statement are valid, but from what I've seen people overwhelmingly choose option 2 over option 1. Is there a technical reason to that, or is it more of a convention?</p>
  
  <hr>
  
  <h3>Why I preferred option 1</h3>
  
  <p>Option 2 hides the fact that <code>MyString</code> is a pointer. This might be the intention, but in objective-c it's more often than not that you do want to know whether you're dealing with a primitive type or a reference type. </p>
  
  <p>In C, at least the convention is to give it a name like <code>MyStringRef</code> to emphasize that it's a pointer, but I don't think I ever seen anyone does that in objective-c.</p>
  
  <hr>
  
  <h3>But option 1 doesn't play nicely with Swift</h3>
  
  <p>And then there's Swift. 
  Both option 1 and option 2 works perfectly fine when bridged to swift, but if I try to mark option1 as a enum-
  <code>
  typedef NSString MyString NS_STRING_ENUM;
  FOUNDATION_EXPORT MyString * const MyStringOne;
  </code></p>
  
  <p>the compiler starts to freak out. Syntax highlight and auto-completion breaks all the time. And something like <code>var x = MyString.one</code> chokes the compiler straight out, leaving only the <strong>Segmentation fault: 11</strong> error.</p>