bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64537: mix lists and vectors when using backquote


From: Stefan Kangas
Subject: bug#64537: mix lists and vectors when using backquote
Date: Sun, 24 Sep 2023 02:47:22 -0700

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?





reply via email to

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