From: Pierre Lairez <pierre.lairez@gmail.com>
To: guile-user@gnu.org
Subject: EOF as datum
Date: Fri, 1 Jul 2016 11:44:16 +0200 [thread overview]
Message-ID: <57763B70.8010006@gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2016-07-01 9:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 9:44 Pierre Lairez [this message]
2016-07-02 2:39 ` EOF as datum Mark H Weaver
2016-07-02 9:14 ` Pierre Lairez
2016-07-02 9:22 ` Pierre Lairez
2016-07-02 10:29 ` Marko Rauhamaa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57763B70.8010006@gmail.com \
--to=pierre.lairez@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).