On Tue 08 Feb 2011 23:16, Andy Wingo <[email protected]> writes: > 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.
I ended up just fixing the docs to match current behavior. I don't think this port-name stuff is a bad idea though. Andy -- http://wingolog.org/
