From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: append, push, and add-to-list.
Date: Mon, 05 Jul 2021 16:53:44 +0200 [thread overview]
Message-ID: <87o8bgg6br.fsf@zoho.eu> (raw)
In-Reply-To: SA2PR10MB4474FB6C7B52BFDE2BCBEFFAF31C9@SA2PR10MB4474.namprd10.prod.outlook.com
Drew Adams wrote:
>> But with '() you see that it is (an empty) list:
>>
>> (defvar lst)
>> (setq lst '())
>
> Yes, for human reading, () suggests that the value might be
> used as a list, and nil suggests that it might not be (e.g.,
> it might be used as a truth value or otherwise).
>
> But there is no reason to quote (). Like t, () is evaluates
> to itself.
Yes, there is a reason, it feels natural because of the way of
creating lists like this '(raz dva tri)
An unquoted list would be, for example, (list 1 2 3) So to
keep it consistent, without a quote, would it be
(defvar lst)
(setq lst (list)) ; nil
?
Is it just me, or does Lisp have so many
parenthesis everywhere? '() makes it easier to spot
immediately, hey, that's an empty list.
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...
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2021-07-05 14:53 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 14:37 append, push, and add-to-list Drew Adams
2021-07-05 14:53 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2021-07-05 15:19 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 16:18 ` [External] : " Drew Adams
2021-07-05 16:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:54 ` Jean Louis
2021-07-06 20:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 15:41 ` tomas
2021-07-05 16:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 17:21 ` tomas
2021-07-06 1:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:39 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 20:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:57 ` Jean Louis
2021-07-06 20:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:56 ` Jean Louis
2021-07-06 20:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:51 ` Quote by Knuth Jean Louis
2021-07-06 20:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 21:57 ` Christopher Dimech
2021-07-06 22:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 22:26 ` Alexandre Garreau
2021-07-06 23:21 ` Christopher Dimech
2021-07-14 16:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 17:37 ` Christopher Dimech
2021-07-14 17:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15 3:08 ` Christopher Dimech
2021-07-18 22:25 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:18 ` Christopher Dimech
2021-07-14 16:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 16:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 17:41 ` Christopher Dimech
2021-07-14 17:43 ` Christopher Dimech
2021-07-14 17:49 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15 3:05 ` Christopher Dimech
2021-07-15 6:50 ` tomas
2021-07-15 6:55 ` Christopher Dimech
2021-07-15 7:11 ` tomas
2021-07-15 10:55 ` Christopher Dimech
2021-07-18 22:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:22 ` Christopher Dimech
2021-07-18 22:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:27 ` Christopher Dimech
2021-07-14 19:24 ` Jean Louis
2021-07-14 20:15 ` Christopher Dimech
2021-07-14 20:30 ` Marcin Borkowski
2021-07-14 20:58 ` Christopher Dimech
2021-07-14 22:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 21:04 ` Christopher Dimech
2021-07-14 23:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15 6:06 ` Marcin Borkowski
2021-07-15 6:21 ` Christopher Dimech
2021-07-17 18:43 ` Marcin Borkowski
2021-07-18 7:41 ` Christopher Dimech
2021-07-18 11:50 ` Jean Louis
2021-07-18 13:17 ` Christopher Dimech
2021-07-18 13:41 ` Jean Louis
2021-07-18 17:57 ` Christopher Dimech
2021-07-18 23:25 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 16:27 ` Christopher Dimech
2021-07-20 16:39 ` Christopher Dimech
2021-07-18 22:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 16:41 ` Christopher Dimech
2021-07-18 22:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:10 ` Christopher Dimech
2021-07-18 13:54 ` Christopher Dimech
2021-07-18 22:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-18 22:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15 2:58 ` Christopher Dimech
2021-07-15 6:43 ` Eli Zaretskii
2021-07-18 22:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-19 7:07 ` tomas
2021-07-19 8:05 ` Christopher Dimech
2021-07-21 4:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21 8:55 ` Christopher Dimech
2021-07-21 4:28 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21 8:42 ` Gregory Heytings
2021-07-19 8:44 ` lisa-asket
2021-07-06 21:34 ` Christopher Dimech
2021-07-05 16:19 ` [External] : Re: append, push, and add-to-list Drew Adams
2021-07-05 16:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2021-07-04 3:18 Hongyi Zhao
2021-07-04 4:35 ` Jean Louis
2021-07-04 5:11 ` Hongyi Zhao
2021-07-04 11:28 ` Jean Louis
2021-07-04 13:50 ` Hongyi Zhao
2021-07-04 15:58 ` Jean Louis
2021-07-05 2:04 ` Hongyi Zhao
2021-07-04 16:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-04 16:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 2:16 ` Hongyi Zhao
2021-07-05 3:48 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 4:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 5:07 ` Hongyi Zhao
2021-07-05 5:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 6:19 ` Hongyi Zhao
2021-07-05 5:06 ` Jean Louis
2021-07-05 6:22 ` Hongyi Zhao
2021-07-05 6:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8bgg6br.fsf@zoho.eu \
--to=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).