Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2003-10-21 12:56:51

I wrote:

> > "Side effect" indicates that it should affect the visible
> parts of the
> > execution, just like in the operational abstract machine in the C++
> > language, does it not? Writing to a memory cell which is
> never read is
> > hardly a side-effect, is it?

Dave wrote:
> It depends if that memory is mapped to an output channel
> which doesn't affect the values in the program. I almost wrote:
> int f(int x) { std::cout << x; return x; }
> Just imagine that cout didn't have a value that could change
> detectably.

Fair enough. Except that I then would have to imagine nobody being a
smart-ass and trying to bind that output channel to an input channel, either
directly, or through a buffer (such as a file) ;-)

> That said, we need the same fudge about external side-effects
> in order to describe the exception-safety guarantees. It's a nit.

Yes, it is. That is why we all love Haskell...


Boost list run by bdawes at, gregod at, cpdaniel at, john at