| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]
"Marshall Spight" <marshall.spight_at_gmail.com> wrote in message
news:1119661268.380487.23320_at_g47g2000cwa.googlegroups.com...
> vc wrote:
>> Marshall Spight wrote: >> > >> [...] >> > At the same time, there's a common meme that says that "side effects" >> > (often meaning either access to global variables or I/O) necessarily >> > destroy referential transparency, but that's dicey at best. It doesn't >> > distinguish between input/read vs. output/write, and the distinction >> > is huge. In essence, a function can output to streams or update >> > globals all it wants and it will not alter the return value of the >> > function. >> >> Suppose we have a function f(a) defined as returning 2*a. Given the >> expression x=f(a);x+x we can rewrite it as f(a) + f(a). Now, let's >> assume that f(a) in addition to doubling its argument prints it. We >> cannot transform the original expression any more because the argument >> would be printed twice, the program behaviour would change. >
>
>
I do not need "to expand the definition of function". Including side effect treatment is a commonly accepted is a standard approach and has been such for many years. One *must* include the notion of state because that's exactly what a function with side effects does, changes the state.
>I don't think such a definition would be very useful,
Au contraire, ignoring side effects in a hypothetical computational model would be extremely strange, to say the least. I do not wish to discuss the subject of side effects and referential transparency in general any further since it's been hashed and rehashed many times . One can consult any decent book on FP or denotational semantics for further info.
.
> but maybe it would be in the right context.
>
So what's you point re. the virtual machine ? We do not need to anything of the kind you describe. There are several ways to handle side effects in FLs including monads, continuation passing , the notion of the "unique world" in Clean, etc.). Received on Fri Jun 24 2005 - 23:21:38 CDT
![]() |
![]() |