On Mon 31 May 2010 18:27, [email protected] (Ludovic Courtès) writes: > Andy Wingo <[email protected]> writes: > >> On Sun 30 May 2010 22:24, No Itisnt <[email protected]> writes: >> >>>>> 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? > > EOF and char are clearly disjoint types.
No argument there :) The point is that the return type of read-char is not "Char"; it is either a char or EOF. The proposal is to make char predicates return #f for EOF as well, making them accept the same type as read-char returns. > I don’t see how R5RS or SRFI-14 would allow this It does seem to be permissible; not normal, but it could be useful. More useful than raising an error, I would imagine... Cheers, Andy -- http://wingolog.org/
