- From: Florent Georges <fgeorges@fgeorges.org>
- Date: Sat, 4 Aug 2012 16:39:21 +0200
- To: EXPath CG <public-expath@w3.org>
On 28 July 2012 18:15, Christian Grün wrote:
Hi Christian,
> Resulting functions would probably look similar to the
> following expression:
> let $id := file:open('.....')
> return ( file:append($id, ...), file:append($id, ...), ... )
> Due to the functional nature of XQuery, however, a processor
> could still decide to execute the second file operation before
> the first.
The point here is to be able to not call them sequentially, but
to make a "functional dependency" between calls by "chaining"
them using one call return value as an input param for the
following calls:
let $id1 := file:open('...')
let $id2 := file:append($id1, ...)
let $id3 := file:append($id2, ...)
return
whatever using (or not) $id3
or:
file:append(file:append(file:open('...'), ...), ...)
or indented differently:
file:append(
file:append(
file:open('...'),
...),
...)
As far as I know, that's the natural way how functional
languages solve the temporal dependency between two calls of
side-effect functions (that is, by materializing within the
functional language itself the side-effect change as a return
value change).
That does not rely on anything else than the usual dependencies
between regular XPath function calls, unless I missed something.
Regards,
--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
Received on Saturday, 4 August 2012 14:40:08 UTC