[m-users.] Coupling stdout and stderr

Volker Wysk post at volker-wysk.de
Mon Mar 13 19:55:13 AEDT 2023


Hi!

In C++ (and Haskell, I think) there's a feature which causes stdout to be
flushed before writing something to stderr. I'm not sure how this is called.
This way, the output on both streams occurs in the right order. Arbitrary
streams can be coupled that way.

I've looked through the io library, but couldn't find anything like that.
When you have a lot of output on stdout and then output something on stderr,
the order gets messed up. You have to manually flash stdout before writing
to stderr.

It isn't necessary to do this coupling in the opposite direction, because
stderr isn't buffered.

I'd like to suggest to add such a feature to the io library.

Cheers, 
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20230313/97a5952c/attachment.sig>


More information about the users mailing list