[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: char-set-contains? and #<eof>

From: Andy Wingo
Subject: Re: char-set-contains? and #<eof>
Date: Mon, 31 May 2010 10:39:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)


[keeping the list cc'd]

On Sun 30 May 2010 22:24, No Itisnt <address@hidden> writes:

>> For example, what would you have Guile do here:
>>  (even? #f) => ?
>>  (char-whitespace? 42) => ?
> I'd have it raise an error.
>>> The reason it bothers me is because it makes it cumbersome to deal
>>> with input from a port.
>> True; but it's just how it is, I think. The EOF object is not a
>> character.
> But it is returned by read-char, unlike the other examples.

A fair point. The consistent thing to do would be to make all char-foo?
predicates return #f for the EOF object (char<? and friends excluded of
course). Ludovic what do you think?

One point against such a change is that such programs would not be
portable -- at least PLT Scheme^H^HRacket raises errors in these
situations, as Guile does. But OTOH Racket folks are not themselves
against changes where things make sense, so perhaps this is not a strong


reply via email to

[Prev in Thread] Current Thread [Next in Thread]