[xquery-talk] xquery 3.1 wishlist

W.S. Hager wshager at gmail.com
Fri Jun 26 08:18:57 PDT 2015


Indeed. The only thing I'll add is that by adding the array feature you
kind of opened Pandora's box. As for me, I'm happy you did, because the
gain is obvious to me. How this will affect future specs I don't want to
hint at, but I'm quite curious.

As for my second case, it doesn't seem like a major change. When iterating
over an array with array:for-each you loose track of the iteration count.
I'm not sure if there's even a workaround, multi-dimensional arrays
considered. Would it be possible to (optionally) provide the iterator index
as the second parameter of the function?

Thanks.



2015-06-26 17:00 GMT+02:00 Michael Kay <mike at saxonica.com>:

> IMHO the current distinction between sequences and arrays could eventually
> be abolished.
> >
>
> Not without dramatic incompatibilities.
>
> The core problem is the equivalence of a singleton sequence and an item.
> Which is a great benefit in the XML arena, because you don’t have to worry
> about whether /book/author is returning a sequence or an item. But you
> can’t do nested sequences/arrays under this model, because if you allow
> nesting then you need to distinguish [[a]] from [a]. So we have arrays that
> allow nesting, and sequences where singletons are the same as items, and
> the two models are irreconcilable.
>
> Michael Kay
> Saxonica
>
>


-- 

W.S. Hager
Lagua Web Solutions
http://lagua.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150626/cc3c99ec/attachment.html>


More information about the talk mailing list