guile-devel
[Top][All Lists]
Advanced

[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: Tue, 01 Jun 2010 09:59:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

On Mon 31 May 2010 18:27, address@hidden (Ludovic Courtès) writes:

> Andy Wingo <address@hidden> writes:
>
>> On Sun 30 May 2010 22:24, No Itisnt <address@hidden> 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/



reply via email to

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