Design Element
Comment on "Using NSIndexSet with NSArray"
by Ian Wilkinson — Mar 26
I do suggest that if your method declares an NSArray as its return value, that you ought to actually return one. Apple's advice on return types is that you should assume that they are correct, even though they might not be. (?!?)

I don't follow this at all. How would the NSMutableArray return type be deemed 'not correct' ? Doesn't basic inheritance and plymorphism dictate that we can return any subclass of NSArray that we please from the method?

I'm interested in seeing a link to the Apple advice that you are referring to.
Back to "Using NSIndexSet with NSArray"
Design Element

Copyright © Scott Stevenson 2004-2015