Still reading through the #Emacs #Elisp intro. One line reads, "A list of the arguments: in this example, an empty list, ‘()’," However, in my #mathematics-oriented brain, I correct it to "*the* empty list," I guess it's because set theory calls a set with no members *the* empty set. 🤡

@BeefGriller

Honestly, you're not wrong. All lists end with '() or nil depending on what you want to call it, and it's always the same, so I tend to call it the empty list as well :)

@boo_ @BeefGriller do they all get represented as the nil ptr? i think in at least in scheme there is no separate nil value so it may be actually eq objects (not sure about emocs lisp or common lisp)

@zenmaya @boo_ @BeefGriller in elisp the fundamental construct is not the list but the cons-cell. a list is defined as a (cons ... (cons lastvalue nil)).

note that listp function doesn't check whether the last cell is nil. listp stands for "either a cons-cell or nil".

nil is a self-evaluating symbol. as such, i assume there's only one nil. but haven't digged the source code.

@mekeor @zenmaya @boo_ @BeefGriller source code digger here. Looks like nil is defined as the integer 0 in the C sources https://cgit.git.savannah.gnu.org/cgit/emacs.git/tree/src/lisp.h#n619
lisp.h « src - emacs.git - Emacs source repository

@birdgoose Awesome find, and very interesting. Thank you for looking that up!