[sc34wg3] TMQL: Scope and tuple sequences
Robert Barta
rho at devc.at
Fri Nov 9 09:10:18 EST 2007
On Fri, Nov 09, 2007 at 02:29:16PM +0100, Lars Heuer wrote:
> To my knowledge neither TMDM nor TMRM nor the TMDM->TMRM
> implies any ordering (i.e. for scope).
>
> My conclusion of this mismatch is, that the following query may
> produce an empty sequence:
>
> //person == //person
>
> Since we have no ordering, the left hand side may, for example, produce
>
> (lennon, mccartney)
>
> while the right hand side may produce
>
> (mccartney, lennon)
>
> And therefor the "==" operation returns an empty sequence.
Not really.
// person
returns a (unordered) tuple sequence, and that looks like this
[
mccartney,
lennon
]
So this is "vertically" organized. (It takes explicit effort to
convert a vertical sequence into a single tuple, which is
'horizontal'. This is done with one of the functions in the Appendix
(predef env), btw).
To make this clearer, another example would be
( // person, // person )
which may give you
[
[mccartney, mccartney],
[mccartney, lennon]
[lennon, mccartney]
[lennon,lennon]
]
in whatever order.
\rho
More information about the sc34wg3
mailing list