From: Stefan Kangas <stefankangas@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 64537@debbugs.gnu.org, Shynur Xie <one.last.kiss@outlook.com>
Subject: bug#64537: mix lists and vectors when using backquote
Date: Sun, 24 Sep 2023 02:47:22 -0700 [thread overview]
Message-ID: <CADwFkmkp6m491+H-Ox+ivJqfn8ML0jNV_9yHQbTjWbDZ=8Me-A@mail.gmail.com> (raw)
In-Reply-To: <jwvr0mq8d5x.fsf-monnier+emacs@gnu.org>
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> The docstring of ‘backquote’ says “vectors work just like lists”.
>>> Should we also clarify that mixing lists and vectors these 2 way:
>>>
>>> `(... ,@[...]) ; by contrast: `(,@[] 1) => (1)
>>> `[,@'()] ; by contrast: `[1 ,@'()] => [1]
>>>
>>> will lead to unexpected behavior? Or suggest not doing so? Or let
>>> ‘backquote’ detect this and signal an error?
>>
>> Copying in Stefan Monnier.
>
> Is there a good reason why we have those unexpected behaviors?
I see two unexpected behaviors:
1. `(... ,@[...]) => (\... . [\...])
2. `[,@'()] => [(\,@ 'nil)]
I'd say these are the expected values:
1. `(... ,@[...]) => (\... \...)
2. `[,@'()] => []
I don't see any good reason for them, so perhaps these are just plain
bugs to be fixed?
next prev parent reply other threads:[~2023-09-24 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-09 5:40 bug#64537: mix lists and vectors when using backquote Shynur Xie
2023-09-22 9:08 ` Stefan Kangas
2023-09-22 15:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 9:47 ` Stefan Kangas [this message]
2024-06-08 23:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmkp6m491+H-Ox+ivJqfn8ML0jNV_9yHQbTjWbDZ=8Me-A@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=64537@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=one.last.kiss@outlook.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.