unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* EOF as datum
@ 2016-07-01  9:44 Pierre Lairez
  2016-07-02  2:39 ` Mark H Weaver
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre Lairez @ 2016-07-01  9:44 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-02 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01  9:44 EOF as datum Pierre Lairez
2016-07-02  2:39 ` Mark H Weaver
2016-07-02  9:14   ` Pierre Lairez
2016-07-02  9:22   ` Pierre Lairez
2016-07-02 10:29     ` Marko Rauhamaa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).