chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Default buffering for output ports


From: Alejandro Forero Cuervo
Subject: [Chicken-users] Default buffering for output ports
Date: Tue, 12 Sep 2006 18:50:44 +0000
User-agent: Mutt/1.5.9i

Shouldn't the initial output port in Chicken applications
be line-buffered?  I think this is the standard practice in most
programming languages, but it seems not to be the case with Chicken
(I'm using 2.3 in GNU/Linux).

In the specific case of C, at least in GNU/Linux with glibc:

> The stream stderr is unbuffered. The stream stdout is line-buffered
> when it points to a terminal. Partial lines will not appear until
> fflush(3) or exit(3) is called, or a newline is printed.  This can
> produce unexpected results, especially with debugging output.

I think this is standard practice in other programming languages (a
quick check with Perl seems to confirm it behaves the same way).

I know I can just use set-buffering-mode!, but I believe the default
should be to use line-buffering for the default output port and force
programmers to use set-buffering-mode! to #:none if they want the
current behaviour.

Alejo.
http://azul.freaks-unidos.net/




reply via email to

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