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?
samedi 16 décembre 2017
Is there any difference between if(nil != object) and if(object != nil) in Objective-C?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire