[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61281: “`(a \, b)” equals to “`(a . , b)”
From: |
Drew Adams |
Subject: |
bug#61281: “`(a \, b)” equals to “`(a . , b)” |
Date: |
Sun, 5 Feb 2023 03:30:40 +0000 |
> > Good catch!
> >
> > `(a \, b) returns (a . <value-of-b>)
> >
> > Looks like a bug to me.
>
> Isn't `(a \, b) just another read syntax for
> `(a . (\, b)), which is another syntax for
> `(a . ,b) ?
Well, yes. And that's no doubt why we get that.
But (\, b) shouldn't be handled as ,b. I know
that it is - in Elisp. I don't think it should
be. To me, that spells (faulty) implementation
leaking out.
> With other words, I think `(a \, b) and `(a . ,b) are different read
> syntaxes for the same expression, equivalent to (cons 'a b).
Yes, but see above. I think \, should be read
as the symbol whose print name is ",". To me,
`(a \, b) should be treated like (a foo b): a
list of 3 symbols - no evaluation. And `(a \,b)
should be treated as a list of two symbols,
whose print names are "a" and ",b".
The symbol \, should be read as just a symbol.
The same is not true of just an unescaped comma
- outside a backquoted sexp that raises an error,
and inside one it's handled specially as part of
the backquote syntax.
\, is not just ,
I don't have another Lisp interpreter, but I'm
guessing that Common Lisp does what I expect.
(For Common Lisp also, \ escapes a character.)
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Xie Shynur, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”,
Drew Adams <=
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/04
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/05
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/05
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/05
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/05
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/05
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Ihor Radchenko, 2023/02/06
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/06
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/06