[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: port-filename documentation incorrect
From: |
Andy Wingo |
Subject: |
Re: port-filename documentation incorrect |
Date: |
Tue, 08 Feb 2011 23:16:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
On Mon 07 Feb 2011 21:41, Andy Wingo <address@hidden> writes:
> Quoth the docs:
>
> -- Scheme Procedure: port-filename port
> -- C Function: scm_port_filename (port)
> Return the filename associated with PORT. This function returns
> the strings "standard input", "standard output" and "standard
> error" when called on the current input, output and error ports
> respectively.
I think it does make sense to be able to name a port whatever you want,
but a port-filename should be either a string, indicating a path to a
file, or #f. I propose to add another field to ports, "name", which
will default to #f. The accessor `port-name' will use the filename
field if there is no explicit name. Sockets and other things that want
to name their ports can use the set-port-name! procedure instead of
set-port-filename!. Non-string names will be deprecated.
What do folks think?
Andy
--
http://wingolog.org/