On Thu, Aug 24, 2006 at 02:26:42PM +0100, Frederik Eaton wrote:
> Because of what you said above, it's not perfect. But it's better than
> the default. Look, if someone is writing something to standard error,
> it's probably because they want to accomplish something, such as
> printing a message that the user can read, rather than just printing
> garbage. You need a pretty compelling reason to want to make such a
> basic part of the API useless, and so far you haven't given one.
Well, the idea behind stderr being unbuffered, is that stderr is for
reporting erronious conditions, if your program is going wrong, you want
as much information as you can out of it. printing "['a','b','c'," is a
whole lot more informative than just printing nothing, as it shows
exactly which list member is infinitely looping. The other reason is
principle of least surprise. stderr is pretty much always unbuffered by
default (as in, ANSI c specifies it, and most (all?) languages with a
concept of buffering follow suit) . I would find it quite odd for
haskell to be different than unix norms.
for multithreaded logging, I have always used a mutex to protect the
logging device.
John
--
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs