Distinguished Object Entry: NIL
← Prev | ↑ Chapter | Next → | Index | Symbols
Distinguished Object Entry: NIL
Name
nil
Class
Distinguished object
Related Types
- generalized boolean false
listpreturns T for nil, but(type nil)returns nil — nil is not of typeLIST(which is cons cells only; see "Type Entry: LIST" and thelistp-vs-LISTnote there).
Description
nil is a distinguished object in AutoLISP.
In documented AutoLISP behavior:
- nil denotes falsity in conditional and predicate contexts,
- nil is also the empty list,
(type nil)returns nil, not a distinct runtime type designator such as NIL,listpreturns T for nil (but nil is not of typeLIST; theLISTdesignator covers cons cells only —(type '())is nil),nullandnotreturn T for expressions that evaluate to nil.
Accordingly, this specification does not treat nil as a separate runtime type in the same sense as INT, REAL, STR, LIST, or SYM.
Discussion: nil as bottom (⊥)
The otherwise-odd facts above cohere under a single reading: in AutoLISP nil serves as bottom (⊥). Every operation on bottom yields bottom, which explains, without special cases:
(type nil) => nil ; not SYM, not a distinct NIL designator (boundp 'nil) => nil (not (eq 'sym (type 'nil))) ; the type of nil is NOT the symbol SYM
If nil were an ordinary symbol that evaluates to nil, then (boundp 'nil) returning nil would be inconsistent — a self-evaluating symbol that is nonetheless reported unbound. The ⊥ reading makes the whole family coherent: (quote ⊥) => ⊥, (boundp ⊥) => ⊥, (type ⊥) => ⊥. The dual view — "there is a singleton type NIL whose sole inhabitant prints as nil" — is equivalent; either way nil must not be collapsed to the Common Lisp symbol/type model.
The comparison predicates = /= < <= > >= are another manifestation of ⊥ propagation: they signal a type error on genuinely incompatible non-nil argument types, but return nil (not an error) when any argument is nil — e.g. `(< 1 nil) > nil nil nil) , (< "abc" nil) => nil, (> nil`. See "The Comparison Operators =, /, <, <=, >, >=" (chapter 5).
Representation
It is printed as nil in value position and corresponds semantically to the empty list ().
Valid Operations
listpreturns Tvl-symbolpreturns niltypereturns nil- conditional contexts treat it as false
Compatibility
This is a core language distinction and must not be collapsed to generic Common Lisp symbol or type behavior.
In particular, the Common Lisp type named nil is not an appropriate model for AutoLISP's documented type behavior.
Source Notes
- [type (AutoLISP)](https://help.autodesk.com/cloudhelp/2026/PLK/AutoCAD-LT-AutoLISP-Reference/files/GUID-506C9CC8-B0BD-4A4C-B4C2-006750504509.htm)
- [listp (AutoLISP)](https://help.autodesk.com/cloudhelp/2024/CHS/AutoCAD-AutoLISP-Reference/files/GUID-8755F083-D3BA-45F0-BBAF-D60D3A73240C.htm)
- [vl-symbolp (AutoLISP)](https://help.autodesk.com/cloudhelp/2026/KOR/AutoCAD-LT-AutoLISP-Reference/files/GUID-F51AFE0A-CA6C-428D-8E8D-3607BF551990.htm)
- [null (AutoLISP)](https://help.autodesk.com/cloudhelp/2016/DEU/AutoCAD-AutoLISP/files/GUID-2CA2E5F1-297F-4ECA-9500-5FFCD4877126.htm)
- [not (AutoLISP)](https://help.autodesk.com/cloudhelp/2026/ESP/AutoCAD-MAC-AutoLISP-Reference/files/GUID-991AD6A0-61AA-45C9-8C27-CADF9F36BE71.htm)
- Status: documented by behavior; explicitly not treated here as a separate runtime type.