Re: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]
From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Fri, 24 Jun 2005 00:03:11 GMT
Message-ID: <35Iue.128265$BB4.7099455_at_phobos.telenet-ops.be>
>
> You are sidetracking here. I did not claim that the result *must* be
> printed on the screen. My claim, so far, has been that since 'print'
> is a pure and unmitigated imperative word, the whole construct ('for
> each ... print') should be treated as having side effects, that is,
> non-declarative.
Date: Fri, 24 Jun 2005 00:03:11 GMT
Message-ID: <35Iue.128265$BB4.7099455_at_phobos.telenet-ops.be>
vc wrote:
> Jan Hidders wrote:
>>vc wrote: >> >>Where in the description of the semantics of DAPLEX did it say that the >>result must be actually printed on a screen?
>
> You are sidetracking here. I did not claim that the result *must* be
> printed on the screen. My claim, so far, has been that since 'print'
> is a pure and unmitigated imperative word, the whole construct ('for
> each ... print') should be treated as having side effects, that is,
> non-declarative.
Well, well, well. It seems I am going to have to recant. Not that I completely agree with the above, but I have been studying the syntax and (formal) semantics of Daplex a bit closer, and it seems that the print function cannot only be used at the end of a query, but pretty much anywhere else in any subexpression. (Yay for orthogonality.) And that means you can have side effects during the iteration (not just afterwards, as I assumed). That ruins a substantial amount of optimization possibilities and, hence, cannot in any way be called declarative.
> The same holds true for the 'return' in XQuery (sorry I missed your
> earlier message asking why I do not think XQuery is pure declarative).
- Jan Hidders