[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: append, push, and add-to-list.

From: Emanuel Berg
Subject: Re: [External] : Re: append, push, and add-to-list.
Date: Mon, 05 Jul 2021 18:41:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Drew Adams wrote:

> To each their own. ;-) I don't find '() easier to spot than
> ().

It is easier to spot because it has an additional apostrophe
(or apostrophe-quote) compared to (), that makes it more
visibly and makes it stick out compared to all the (( and ))
of `let', `cond', and more, and in general, from all the
parenthesis of Lisp.

>> But ... ultimately one writes code so the computer can
>> execute it, and not so that a human can read it. So maybe
>> one shouldn't quote empty lists?
>> If so, I have 14 corrections to make...
> No, the computer couldn't care less whether
> you write (list), nil, (), or '(). ;-)

... but you yourself said `list' is a function, nil is
a constant (hm... didn't know we had those -

(defun c-constant-symbol (sym len)
  "Create an uneditable symbol for customization buffers.
SYM is the name of the symbol, LEN the length of the field (in
characters) the symbol will be displayed in.  LEN must be big

This returns a (const ....) structure, suitable for embedding
within a customization type."
  (or (symbolp sym) (error "c-constant-symbol: %s is not a symbol" sym))
  (let* ((name (symbol-name sym))
         (l (length name))
         (disp (concat name ":" (make-string (- len l 1) ?\ ))))
      :size ,len
      :format ,disp
      :value ,sym))))

- perhaps that's something else since it seems to be just
a list where the first element is const - but here, nil is
unsuited for other reasons - and () is a constant (another,
here more suited syntax, for nil), and '() is another syntax
for (quote ()), which is `quote' a special form?

Maybe the "special form" thing is that it doesn't eval
the argument?

  (setf (quote ...) ...)

Both list and quote are built-in, IOW written in C?

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]