Hi, Andy Wingo <wi...@pobox.com> writes:
> On Sun 30 May 2010 22:24, No Itisnt <theseaisinh...@gmail.com> 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? I don’t see how R5RS or SRFI-14 would allow this. For instance R5RS has this: -- procedure: char? obj Returns #t if OBJ is a character, otherwise returns #f. and this: -- procedure: eof-object? obj Returns #t if OBJ is an end of file object, otherwise returns #f. The precise set of end of file objects will vary among implementations, but in any case no end of file object will ever be an object that can be read in using `read'. So EOF and char are clearly disjoint types. Am I missing something? Thanks, Ludo’.