From: Zefram <zefram@fysh.org>
To: 21915@debbugs.gnu.org
Subject: bug#21915: write inconsistent about #nil
Date: Sat, 14 Nov 2015 01:46:56 +0000 [thread overview]
Message-ID: <20151114014656.GT13455@fysh.org> (raw)
The write function is inconsistent about whether it distinguishes between
#nil and ():
scheme@(guile-user)> '(#nil . a)
$1 = (#nil . a)
scheme@(guile-user)> '(a . #nil)
$2 = (a)
Thee latter behaviour, emitting #nil as if it were (), breaks the usual
write/read round-tripping, and the traditional correspondence between
equal? and matching of written representation. Admittedly those standards
are not absolute, nor is the extent to which they're expected to hold
documented, but #nil is clearly sufficiently atomic to be the kind of
value to which one would expect them to apply. For these reasons,
if a consistent behaviour is to be chosen, I think it should be to
consistently distinguish the values.
I think the behaviour should be consistent. The values should be
distinguished or not without regard to the context in which they arise
within an s-expression.
Whatever is done, even if it's to endorse the inconsistency, the behaviour
should be documented, with rationale.
-zefram
next reply other threads:[~2015-11-14 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 1:46 Zefram [this message]
2021-05-14 13:34 ` bug#21915: write inconsistent about #nil Taylan Kammer
2021-05-14 21:31 ` Taylan Kammer
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151114014656.GT13455@fysh.org \
--to=zefram@fysh.org \
--cc=21915@debbugs.gnu.org \
/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).