In reading old Objective-C code, specially the pre ARC codes, too often I have come across if(nil != someObjectPointer) which makes me question why nil is in the left side of the comparison? Is there a particular reason for this? Is if(nil != someObjectPointer) different from if(someObjectPointer != nil)? Or is this just a matter of programming style?
Aucun commentaire:
Enregistrer un commentaire