I am currently writing the I/O procedures for my pet interpreter,
Scheme 9 from Empty Space (plug: http://t3x.org/bits/s9fes/).
While writing the procedures I wondered how to deal with
(close-input-port (current-input-port))
at the top level. While this expression may be useful in
some program code, it is obviously a silly thing to do in
an interactive environment.
I thought I should handle the standard I/O ports in a special
way and signal an error instead of really closing the port.
(This is what S9fES currently does.)
BTW, MzScheme and Scheme48 start complaining about the closed
port ad infinitum and Chez simply seems to ignore the request,
so there does not seem to be an abvious way to handle this
situation.
What do you think?
--
Nils M Holm <n m h @ t 3 x . o r g> -- http://t3x.org/nmh/