nil指向oc对象的空指针 其定义为(id)0;
Nll 指定oc中class的空指针 其定义为(class)0;
NULL 是指标准规定的宏定义,用来表示空指针常量 通常来讲定位为(void*)0;
ps:什么是空指针(nullpointer)?
If a null pointer constant is converted to a pointer type, the resultingpointer, called a null pointer, is guaranteed to compare unequal to a pointerto any object or function
译: 如果将空指针常量转换为指针类型,则保证结果指针(称为空指针)将不相等的指针与指向任何对象或函数的指针进行比较
如果 p 是一个指针变量,则 p = 0; p = 0L; p = '\0'; p = 3 - 3; p = 0 * 17; 中的任何一种赋值操作之后(对于 C 来说还可以是 p = ( void*)0;), p 都成为一个空指针,由系统保证空指针不指向任何实际的对象或者函数。反过来说,任何对象或者函数的地址都不可能是空指针。(tyc: 比如这里的(void*)0就是一个空指针。把它理解为null pointer还是null pointer constant会有微秒的不同,当然也不是紧要了)