Re: OO versus RDB

From: Marshall <>
Date: 11 Jul 2006 09:25:21 -0700
Message-ID: <>

Gene Wirchenko wrote:
> On 9 Jul 2006 16:47:40 -0700, "Tony D" <>
> wrote:
> [snip]
> >Aside from 'printf("hello, world\n")' being a procedure call rather
> >than a function (that a value is left lying in a register was, at least
> >initially, just a happy (or otherwise) accident of the way C was
> >implemented), if we assumed that the return value of printf() was some
> >integer, then the emergence of text on an output device would be
> >considered a side effect of obtaining the return value.
> The return value of printf() *is* an int. That is that way it is
> defined.

That's valid. The point in my mind, though, is whether we are really going to say that getting that int was the primary reason we decided to call printf, and it is only a side effect that it does some output?

In fact, let's imagine we write a function with the same signature as printf except that it returns void. Now it seems even more bizarre to call the output a "side" effect.

Sometimes output is the whole point. Sometimes it is a side effect. We don't seem to have a conceptual model that can tell the difference.

Marshall Received on Tue Jul 11 2006 - 18:25:21 CEST

Original text of this message