guile-devel
[Top][All Lists]
Advanced

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

Re: Patch for ice-9/format.scm (~&)


From: Matthias Koeppe
Subject: Re: Patch for ice-9/format.scm (~&)
Date: 14 Jun 2001 10:10:58 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6

Rob Browning <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
> 
> > Between two calls to format, without a port that maintains a column
> > count, it can not work in general.  Should we want it to work when
> > the same port is used, and fail mysteriously when the port is
> > switched; or should we allow it to fail even when the port stays the
> > same from call to call, giving less cryptic behaviour.  I don't
> > know.  Is it a important decision?  Beats me as well.  What is
> > probably worse is that format is not thread safe, as it is.
> 
> I wonder if/how CL handles this...  If I remember, I'll look it up.

In CL, ~& outputs a new line if the port column cannot be determined. 

I believe we should make format behaviour predictable and free of
side-effects (and thread-safe).  That is, if no port columns are
available, don't even attempt to maintain columns across format calls
because the attempt will cause cryptic behavior in the cases described
above.

For thread-safeness we would need to get rid of the global format
variables and replace them with fluids or one structure passed between
all the internal procedures.

BTW: Can it really happen in Guile that port columns are not
available, i.e. port-column returns #f?  Before my port-column patch,
output ports would return 0 all the time...

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe



reply via email to

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