null nil in Swift - Stack Overflow 8 Swift’s nil is not the same as nil in Objective-C In Objective-C, nil is a pointer to a non-existent object In Swift, nil is not a pointer—it is the absence of a value of a certain type Optionals of any type can be set to nil, not just object types NULL has no equivalent in Swift nil is also called nil in Swift Nil has no equivalent