Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!ucbvax!tekchips.tek.COM!willc
From: willc@tekchips.tek.COM
Newsgroups: comp.lang.scheme
Subject: two questions
Message-ID: <8712012321.AA27353@tekchips.TEK.COM>
Date: Tue, 1-Dec-87 18:21:05 EST
Article-I.D.: tekchips.8712012321.AA27353
Posted: Tue Dec  1 18:21:05 1987
Date-Received: Sat, 5-Dec-87 01:43:58 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 34

>Could the responsible parties please answer these questions, and post
>the questions and answers to the scheme mailing list?  Thanks.
>-Jonathan

Maybe that should be "irresponsible parties".  I guess someone has to take
the rap, so here are my excuses.

    1) The report mentions two procedures (close-input-port ) and
       (close-output-port ).  I don't see why it is necessary to
       have two procedures to close ports.  Wouldn't it be sufficient
       to have something like "close-port" that can be applied to both
       types of ports?

Yes, and I would not be surprised if most Scheme implementations do it
that way internally.  OPEN-INPUT-FILE and OPEN-OUTPUT-FILE need to be
distinct, and I guess it seemed more symmetric for them to have distinct
"inverses".

    2) What is the exact difference between (write-char ) and
       (display )?  "write-char" seems to be redundant.  Is "display"
       supposed to terminate its output by a space or newline or something
       like this?

Chris Hanson noted the historical fact that DISPLAY originally acted like
WRITE on characters, so WRITE-CHAR was once necessary for that reason.  He
noted also that DISPLAY, being generic, is likely to be much less efficient
than WRITE-CHAR.  Kent Dybvig pointed out that characters are not guaranteed
to be distinct from other data types, say small integers or strings of one
character, so WRITE-CHAR is the only portable way you can write a character
itself as opposed to some representation of the character.  Thus WRITE-CHAR
remains necessary.

Peace,
William Clinger