null nil

Language null true false Java null true false Python None True False Objective-C nil, or NULL, or [NSNull null], depending on context YES NO C NULL anything except 0 0 Lisp NIL T NIL Objective-C is psychotic. It’s a Smalltalk dialect built on top of C (and for the most part, it got the good […]

Language null true false
Java null true false
Python None True False
Objective-C nil, or NULL, or [NSNull null],
depending on context
YES NO
C NULL anything except 0 0
Lisp NIL T NIL

Objective-C is psychotic. It’s a Smalltalk dialect built on top of C (and for the most part, it got the good bits of both and left out the bad bits). Obj-C lets you instantiate arrays like [NSArray arrayWithObjects:@"Hello", @"World", nil], using nil as an end-of-array marker because C’s varargs implementation doesn’t know how many args you passed. So it has this extra “null” object that’s not really null.