unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* 0e as identifier
@ 2010-01-02 12:45 Bill Schottstaedt
  2010-01-03 11:52 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Schottstaedt @ 2010-01-02 12:45 UTC (permalink / raw)
  To: bug-guile

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").





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-03 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-02 12:45 0e as identifier Bill Schottstaedt
2010-01-03 11:52 ` Andy Wingo
2010-01-03 13:56   ` Bill Schottstaedt

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).