6 ms·
random question: doesn't ObjC define 'nil' (or self?) as 'void*'? I did some ObjC coding 2 years ago and I remember seeing something like this and thinking: oh
by optymizer 13y ago
random question: doesn't ObjC define 'nil' (or self?) as 'void*'? I did some ObjC coding 2 years ago and I remember seeing something like this and thinking: oh boy.
- rdouble 13y agoNil is (void *)0.
- geon 13y agoThe ’id’ type is a void *. It is used extensively, whenever there are multiple possible return types. Even where inheritence could have been used to make it more speciffic. For example, ’alloc’ and all ’init’ returns it.
- 0x09 13y ago> The ’id’ type is a void . non typedef struct objc_class *Class; typedef struct objc_object { Class isa; } *id; with struct objc_class { Class isa; /* objc v1 members omitted */ };