3 ms·
> I dunno it looks to me like they've just defined nil to be equal to null/empty, which is not exactly the same. But it is how nil is defined in SICP: 'The va
by dghf 12y ago
> I dunno it looks to me like they've just defined nil to be equal to null/empty, which is not exactly the same.
But it is how nil is defined in SICP:
'The value of nil, used to terminate the chain of pairs, can be thought of as a sequence of no elements, the empty list. The word nil is a contraction of the Latin word nihil, which means "nothing."' -- http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html#%_idx_1596 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html...
And then in a footnote to that paragraph:
"It's remarkable how much energy in the standardization of Lisp dialects has been dissipated in arguments that are literally over nothing: Should nil be an ordinary name? Should the value of nil be a symbol? Should it be a list? Should it be a pair? In Scheme, nil is an ordinary name, which we use in this section as a variable whose value is the end-of-list marker (just as true is an ordinary variable that has a true value). Other dialects of Lisp, including Common Lisp, treat nil as a special symbol. The authors of this book, who have endured too many language standardization brawls, would like to avoid the entire issue. Once we have introduced quotation in section 2.3, we will denote the empty list as '() and dispense with the variable nil entirely." -- http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html#%_idx_1598 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html...