title: Should +initialize/+load always start with an: if (self == [MyClass class]) guard?
body: <p>When implementing an +initialize or +load method in one of your Objective-C classes, should you <em>always</em> start with this kind of guard?:</p>
  
  <pre><code>@implementation MyClass
  
  + (void)initialize {
      if (self == [MyClass class]) {
          ...
      }
  }
  
  ...
  @end
  </code></pre>
  
  <p>Seems like code in +load and +initialize usually only wants to be executed once. So this would help avoid dupe execution when subclasses load/initialize.</p>
  
  <p>I guess I'm just wanting some reinforcement from some ObjC wizards that this is necessary/common practice...</p>
  
  <p>What's the common wisdom on this? would you recommend always doing this?</p>
  
  <p>Is your advice the same for both +load and +initialize, or is there a difference in they way they should be handled?</p>
  
  <p>thanks.</p>