guile-user
[Top][All Lists]
Advanced

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

EOF as datum


From: Pierre Lairez
Subject: EOF as datum
Date: Fri, 1 Jul 2016 11:44:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Dear all,

I understand why we cannot use (eof-object) in a “case” statement. For
example, this will not run as it is meant:
(case (get-char port)
    (((eof-object)) ...)
    (else ...))

Is is possible to define something like #eof that will be datum and make
the following work as expected?
(case (get-char port)
    ((#eof) ...)
    (else ...))

That would simplify (a little, I admit it is not a great deal) the
processing of input data.
One way I see it to define say ##eof thanks to the hash extend
mechanism. Do I miss something simpler?

Best,

Pierre



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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