From: Mark H Weaver <mhw@netris.org>
To: Andy Wingo <wingo@pobox.com>
Cc: dwheeler@dwheeler.com, almkglor <almkglor@gmail.com>,
12216 <12216@debbugs.gnu.org>
Subject: bug#12216: peek-char incorrectly *CONSUMES* eof
Date: Wed, 13 Mar 2013 14:10:15 -0400 [thread overview]
Message-ID: <87r4jj188o.fsf@tines.lan> (raw)
In-Reply-To: <87r4jjfjya.fsf@pobox.com> (Andy Wingo's message of "Wed, 13 Mar 2013 15:33:33 +0100")
Andy Wingo <wingo@pobox.com> writes:
> On Wed 13 Mar 2013 14:09, "David A. Wheeler" <dwheeler@dwheeler.com> writes:
>
>> Andy Wingo:
>>
>>> So, we are repeating ourselves here :) I agree with you but I can't see
>>> a good way of implementing this.
>>
>> Would the per-port reader options be reasonable place to store the info
>> about EOF?
>
> For your own purposes that would be fine. But it cannot affect
> read-char / peek-char / etc for everyone, because it would have bad
> global effects on performance and correctness. That's why I'm pushing
> back on fixing this in Guile itself.
I don't know, it might not be that bad, now that we've agreed on a way
to extend the port structure in 2.0. Maybe we could just have a "last
peek-char returned EOF" flag that would be consulted by the other read
primitives.
I agree that we should not allow EOF to be unread.
What do you think?
Mark
next prev parent reply other threads:[~2013-03-13 18:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1T29qG-00049i-Rt@fenris.runbox.com>
[not found] ` <CAF+kUQVT7BmVaZ-XNFDNpaPFXyWUZv9msC_3m9iNa3yQzKw_1w@mail.gmail.com>
2012-08-17 1:53 ` bug#12216: peek-char incorrectly *CONSUMES* eof David A. Wheeler
2013-03-05 16:53 ` Andy Wingo
2013-03-05 19:17 ` David A. Wheeler
2013-03-07 21:32 ` Andy Wingo
2013-03-09 2:25 ` Daniel Hartwig
2013-03-09 17:11 ` David A. Wheeler
2013-03-10 0:23 ` Daniel Hartwig
2013-03-13 11:02 ` Andy Wingo
2013-03-13 13:09 ` David A. Wheeler
2013-03-13 14:33 ` Andy Wingo
2013-03-13 18:10 ` Mark H Weaver [this message]
2013-03-13 18:22 ` Andy Wingo
2013-03-14 17:13 ` Mark H Weaver
2013-03-14 17:43 ` David A. Wheeler
2013-03-30 22:37 ` Mark H Weaver
2013-03-30 23:02 ` David A. Wheeler
2013-04-01 2:05 ` Mark H Weaver
2013-04-01 21:27 ` Mark H Weaver
2013-04-01 21:33 ` David A. Wheeler
2013-04-02 7:58 ` Andy Wingo
2013-04-02 19:41 ` Mark H Weaver
2013-04-04 20:00 ` Andy Wingo
2013-04-04 21:53 ` Mark H Weaver
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=87r4jj188o.fsf@tines.lan \
--to=mhw@netris.org \
--cc=12216@debbugs.gnu.org \
--cc=almkglor@gmail.com \
--cc=dwheeler@dwheeler.com \
--cc=wingo@pobox.com \
/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).