I’m trying to understand the difference between these two concepts and I find it useful to try to explain it in my own words – could I just check my understanding please?
Two variables are identical (and unavoidably equal) if they both point to the same address - this is what you’re checking for with the basic NSObject isEqual.
However, two variables can be equal and not identical if they point to two different addresses which happen to have exactly the same content (and presumably the same type?) - and this what the NSString version of isEqual does. Is that right?
But I’m not sure I understand the practical difference between the two NSMutableArray methods. Does it simply mean than indexOfObject can be true if anObject is a separate object sharing the same contents, while indexOfObjectIdentical çan only be true if it’s the object at the same memory address?