From: "Bill Schottstaedt" <bil@ccrma.Stanford.EDU>
To: bug-guile@gnu.org
Subject: 0e as identifier
Date: Sat, 2 Jan 2010 04:45:19 -0800 [thread overview]
Message-ID: <20100102124123.M26871@ccrma.Stanford.EDU> (raw)
I believe r5rs says an identifier can't start with a digit, but
guile allows it to:
scheme@(guile-user)> (symbol? (make-symbol "0"))
#t
scheme@(guile-user)> (symbol->string (make-symbol "0"))
"0"
scheme@(guile-user)> (keyword? (symbol->keyword (string->symbol "0")))
#t
scheme@(guile-user)> (symbol? (string->symbol "0e0"))
#t
which leads one naively to:
scheme@(guile-user)> (let ((0e 1)) 0e)
1
scheme@(guile-user)> (let ((0e0 1)) 0e0)
<error printout>
Not a bug, I guess, but not very pretty.
(r6rs says an identifier "begins with a character that cannot
begin a representation of a number object." I think they meant
"a sequence of characters").
next reply other threads:[~2010-01-02 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 12:45 Bill Schottstaedt [this message]
2010-01-03 11:52 ` 0e as identifier Andy Wingo
2010-01-03 13:56 ` Bill Schottstaedt
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=20100102124123.M26871@ccrma.Stanford.EDU \
--to=bil@ccrma.stanford.edu \
--cc=bug-guile@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).