[Scheme-reports] close-port Andy Wingo (19 May 2011 20:45 UTC)
Re: [Scheme-reports] close-port John Cowan (19 May 2011 23:01 UTC)
Re: [Scheme-reports] close-port Aaron W. Hsu (20 May 2011 02:09 UTC)
Re: [Scheme-reports] close-port John Cowan (20 May 2011 04:31 UTC)

Re: [Scheme-reports] close-port Aaron W. Hsu 20 May 2011 02:09 UTC

On Thu, 19 May 2011 18:59:32 -0400, John Cowan <cowan@mercury.ccil.org>
wrote:

> Andy Wingo scripsit:
>
>> Why not specify `close-port' instead of `close-input-port' and
>> `close-output-port' ? Is there any benefit that having two procedures
>> when one would do, except compatibility?  (Because if it's simply for
>> compatibility, one can provide shims.)
>
> Scheme isn't big on generic procedures, which is why we have length and
> vector-length and string-length and blob-length.  Genericity is a Good
> Thing, but just a little bit of it doesn't buy you much.  We did add
> `port?`, but that's because it was mentioned in section 2.3 but not in
> section 6, leading to substantial uncertainty and differences between
> implementations.

I do not believe that we have input/output ports. If we did have comined
input/output ports, it would make sense to have a close-port procedure. As
it is, I don't think we lose much in having both, since you should always
know which one your are dealing with. On the other hand, I do think it is
convenient to have close-port, and I imagine that most Schemes have this
procedure anyways.

	Aaron W. Hsu

--
Programming is just another word for the lost art of thinking.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports