[Bus-scheme-discuss] Fwd: Character Literals
Phil Hagelberg
phil at hagelb.org
Thu Mar 20 12:13:57 EDT 2008
JD Huntington <jedediah at jdhuntington.com> writes:
> I did a bit of looking into how character literals are handled in some
> other versions of scheme, and thought it might be useful for
> discussion. As of now, bus-scheme character literals are parsed into
> one-character strings. However, it appears this is not the case in at
> least one other scheme implementation. Here's a snippet from PLT:
>
> (char? #\a)
>
> #t
>
> (char? "a")
>
> #f
Bugger it all. I just checked R5RS, and it says (under section 3.2,
Disjointness of Types) that "No object satisfies more than one of the
following predicates:
boolean?
pair?
symbol?
number?
char?
string?
vector?
port?
procedure?".
So the standard is quite clear; it's just a question of whether we want
to follow Scheme or Ruby here. I personally prefer Ruby 1.9's approach
(Ruby 1.8's being, of course, totally brain-dead). I think we can leave
it how it is unless there are objections.
-Phil
More information about the Bus-scheme-discuss
mailing list