Once I saw nil or 'nil from some (setq …), it usually worried me.

The barely nil appears to be a variable name no more than `foo bar zoo` and there shoud be a value it points to.The quoted 'nil seems to be a data or a value in data mode and there might exist a name it is given.it looks no difference with symbols as 'nilll 'nilllllll or 'nillllllllll as data.

Every time see them, I find myself hesitating, uncertain and disturbing.

This picture tells they are identical and comfort me to get an insight that lisp is much more pragmatic in evovling by patching up.

As a result, I stop worring its theoretical consistency and confidently proceed with using `nil`.

4 disguises of nil

The wizard book SICP states it as:

Lisp was not the product of a concerted design effort. Instead, it evolved informally in an experimental manner in response to users' needs and to pragmatic implementation considerations.

  • zyni-moe@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    nil being self-evaluating is not strange. Since nil is a symbol it can be defined as a constant. So there is nothing to stop a Lisp implementation saying (in CL):

    (defconstant nil 'nil)
    

    just the same as

    (defconstant t 't)
    

    What is strange is these things:

    strange thing true in CL? true in elisp? true in Scheme?
    () is a list but not a cons yes yes yes
    () is both a list and a symbol yes yes no
    () is self-evaluating yes yes no