title: Objective-c return method returning NSMutableArray instead of declared NSArray return type
body: <p>If I want to return an immutable array like this <code>+ (NSArray *)ids</code> but inside this method I'm declaring a <code>NSMutableArray</code> because I want to sort it using <code>-sortUsingSelector:</code>. </p>
  
  <p>Returning this method works perfect. </p>
  
  <ul>
  <li><p>But is it "okay" to write code that declares that the return method should be one type and the actually type is another? </p></li>
  <li><p>Does this work because <code>NSMutableArray</code> is a subclass of <code>NSArray</code>?</p></li>
  <li><p>Is the actual return value an <code>NSArray</code> or an <code>NSMutableArray</code>?</p></li>
  </ul>