[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61281: “`(a \, b)” equals to “`(a . , b)”
From: |
Michael Heerdegen |
Subject: |
bug#61281: “`(a \, b)” equals to “`(a . , b)” |
Date: |
Mon, 06 Feb 2023 04:03:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Drew Adams <drew.adams@oracle.com> writes:
> And the question is about "\,", not ",".
>
> (setq ,X 42) ; => 42
> (setq \,X 42) ; => (wrong-type-argument symbolp (\, X))
The other way round.
"\,X" is interpreted as symbol, just as "\,".
What's the question about "\,"?
> (I'd be interested in what the case is in Common
> Lisp, including what a typical implementation is.)
AFAIU, there are different implementations. I tested two random CL and
two random scheme interpreters. Of those 4, 3 expanded
,X --> (unquote X), and in one case ,X was read as an atomic expression.
> The question is whether \, and , should have the
> same behavior. Certainly \z and z have the same
> behavior. But character z has no special behavior
> inside a backquote.
I think the necessity to escape the comma to get the symbol has been
introduced to avoid ambiguities with uses of the reader macro.
> \@ and @ don't have the same behavior inside a
> backquote. And neither do \. and . -- only \,
> and , have the same behavior. To me, that's just
> an implementation/design thing, not something
> normal or inevitable. Not a big deal, not the
> end of the world. I minor unfortunate thing
> (gotcha).
In any case, much too late to change it.
> I pointed to the comments in the code. They tell the story. But I
> don't think there's any such explanation/description in the doc.
Yes, it would be good to add something.
Michael.
- 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, 2023/02/04
- 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 <=
- 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
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Michael Heerdegen, 2023/02/06
- bug#61281: Double backquote expansion and ", " (was: bug#61281: “`(a \, b)” equals to “`(a . , b)”), Ihor Radchenko, 2023/02/07
- bug#61281: Double backquote expansion and ", ", Michael Heerdegen, 2023/02/07
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Andreas Schwab, 2023/02/06
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Drew Adams, 2023/02/06
- bug#61281: “`(a \, b)” equals to “`(a . , b)”, Andreas Schwab, 2023/02/07