Re: u8-ready? and char-ready? Marc Feeley 04 Mar 2020 15:06 UTC

> On Mar 4, 2020, at 9:48 AM, Jim Rees <xxxxxx@gmail.com> wrote:
>
> If we are to honor R7RS, with u8-ready? and char-ready?  I think we are obligated to support their implementation in custom ports as well, otherwise, we are declaring those procedures deprecated and useless (which may be a valid decision).

I agree (except for the validity of deciding to deprecate them).

I think the I/O methods should be extended with the following features

1) a “transfer up to N bytes/characters that are currently available” method that returns the number of bytes/characters that have been transferred (0 when nothing is available)

2) a “transfer at least N bytes/characters” method with an optional timeout parameter indicating how long to wait for N bytes to become available, and return the number of bytes transferred

These could probably be combined in the same method with many parameters.

This is more general (and useful) than u8-ready? and char-ready?

Marc