guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input only readline port


From: Dirk Herrmann
Subject: Re: Input only readline port
Date: Mon, 15 Jan 2001 16:08:38 +0100 (MET)

On 15 Jan 2001, Marius Vollmer wrote:

> Neil Jerram <address@hidden> writes:
> 
> >     Marius> I can't find any good reason, either, except maybe that
> >     Marius> people want to use the object returned by (readline-port)
> >     Marius> as a port representing the console and thus doing input
> >     Marius> and output on it.  ...
> > 
> > I don't quite follow your intention here.  What would it mean to
> > understand (readline-port) as a console port, or to do output to it?
> 
> I think I meant something like this: People might assume that
> (current-input-port) is connected to a tty and treat it as the
> `current terminal port' and use it both for input and output.  They
> are not be aware that it really is a readline port.
> 
> *Shrug*, I don't know if I'm convinced by this argument, but I don't
> see a need to change the existing practice, either.

IMO it is a bug to assume that (current-input-port) can be used for output
as well.  If there is the possibility that people might follow such an
argument, we should follow Neil's suggestion and make such a misuse
impossible.  Otherwise we will one day _have_ to keep things the broken
way, just because "there is so much code out there that would get broken".  
Better keep people from producing broken code right from the start.

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]