[Ecls-list] gray-stream support

Brian Spilsbury brian.spilsbury at gmail.com
Tue Dec 25 09:28:59 UTC 2007


While gray-streams seem to be basically supported, there are a couple
of problems.

STREAM-ELEMENT-TYPE and CLOSE should be generic functions.

I don't see any obvious way to do this with the these being implemented in C.

print-object has some code for calling print-object for structures and
but this has the advantage that print-object has a distinct name.

I'm wondering if the solution might be to implement close in lisp and
in C separately.

Calling close in C could dispatch to close in lisp if not on a built-in stream.
Calling close in Lisp could dispatch to close in C if on a built-in stream.

This would allow the Lisp close to be a generic-function and the C
close interface
to remain unchanged.

Likewise for stream-element-type.

Does this sound sane?


More information about the ecl-devel mailing list