null
objectThe null
object is a special object that is not an instance of any
class, but that can be stored in a slot intended for any class of
object. This is very much like the NULL
pointer in C. This is
useful when you do not yet have an object to store in a particular
slot.
In Prolog, the null
is represented by the atom null
.
Note that because the null
object is not really an object of any
class, you cannot determine its class with class_of/2
. Unless
noted otherwise, when we write of an object in this document, we
do not include the null
object.