[Haskell] Re: putStr is not evaluated in the correct order

Bruno Martínez br1 at internet.com.uy
Sun Sep 10 14:10:50 EDT 2006

On Sat, 09 Sep 2006 23:34:55 -0300, David Sankel <camior at gmail.com> wrote:

> On 9/5/06, Bruno Martínez <br1 at internet.com.uy> wrote:
>> C++ avoids this problem 'tieing' cin and cout.  Why can't haskell do the
>> same?
> I was thinking the same thing. I'm imagining a situation where processes  
> are communicating to each other using pipes, but cannot think of a  
> concrete
> case.

I don't see the problem.  According to "The C++ Programming Language" cout  
is flushed only when cin encounters an underflow, so it doesn't seem  
costly either.

> Do you know if C++ has any way to disable tying std::cin and
> std::cout?

Yes, cin.tie(NULL).


     Conectese mas rapido y ahorre hasta un 50%
    Tel. 0909.2030 =>  $0,15 IVA incluido el minuto
http://www.internet.com.uy - En Uruguay somos internet

More information about the Haskell mailing list