Re: New draft (#3) and last call for comments on SRFI 181: Custom ports
Marc Nieper-WiÃkirchen 20 Apr 2020 16:27 UTC
Am Mo., 20. Apr. 2020 um 18:11 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
[...]
> I think writer can be doable, and probably good to have. I'm wary about the reader, for we don't know if a continuation is captured during read at the time C read is called, so we have to start saving input for every C read call...
> Or maybe we can save "already parsed" parts and any partially-read token. Anyway, thanks for the idea.
Don't we only have to save the input if the C reader sees a custom
port? Buffering of the input read so far could even become part of the
port and not of the reader. The reader requests a handle and the port
starts to buffer under this handle. A non-custom port can simply
ignore those reader requests.