title: What is the clearest method for declaring a constant pointer?
body: <p>I'm using a a pair of functions which use a pointer as a unique key. I want to declare a constant pointer to use as the key. What is the safest and clearest approach to doing this?</p>
  
  <p>Here are 2 possible approaches, but both of which have short comings.</p>
  
  <ol>
  <li><p>A self referencing pointer:</p>
  
  <pre><code>static const void * const propertyKey = &amp;propertyKey;
  //...
  objc_getAssociatedObject(object, propertyKey);
  </code></pre>
  
  <p>Downside: the declaration is long and scary looking! Could easily confuse someone who doesn't know what it's for.
  Upside: Hard once you understand what it does it's easy to use.</p></li>
  <li><p>A static const that should be referenced:</p>
  
  <pre><code>static const char propertyKey;
  //...
  objc_getAssociatedObject(object, &amp;propertyKey);
  </code></pre>
  
  <p>Downside: When used the variable must be referenced rather than simply used, which is easy to miss (but compiler should point this out as a type mismatch). If the declaration is modified so that a value is assigned then it could have disastrous affects because the uniqueness of the pointer could no longer be guaranteed.
  Upside: The declaration is easier to grok.</p></li>
  </ol>
  
  <p>I don't think either of these are immediately obvious. Any better suggestions?</p>