Re: SRFI 181: Custom ports Lassi Kortela 19 Feb 2020 18:13 UTC

> Port positioning (setting and getting) started on the alist, and then
> helper procedures were added.
>
> beep, x-size and y-size operations were added for console ports.
>
> For ports used for communicating with Emacs, operations for reading and
> setting the default directory, for prompting for various types of input
> (so that Emacs would know what text was the prompt), and for noting the
> start and end of garbage collection (so that Emacs would be able to
> display GC indicators) were added.
>
> For various types of textual ports, there are all kinds of operations
> for setting the standard line ending, getting and setting the encoding,
> and inquiring about what encodings are supported.
>
> The alist acts like a set of mixins.  The ability to extend ports beyond
> the standard I/O operations is used all over the place in MIT Scheme,
> and seems like a nice, general facility.

That sounds like a subclass of the port class with extra methods. Or
keyword arguments with &allow-other-keys.