On Mon 07 Feb 2011 21:41, Andy Wingo <[email protected]> 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/

Reply via email to