> XQuery comes from the world of database
I understand this point. From another side, it could be used to write
complex algorithmic : I found this language very handy to that purpose,
because it is a functional language, it is incredibly data flexible, and
template programming is straightforward. Provided basic containers were
added, the community could enrich this language with external modules, best
among them could in turn feed the standardization process. At present time,
as far as I understand, the only way to write a serious algorithm is to
bind XQUERY with an external imperative language, that is not really a good
solution.


2013/12/3 Michael Kay <[email protected]>

>
> On 3 Dec 2013, at 09:49, jean-marc Mercier <[email protected]>
> wrote:
>
> >Saxon tries quite hard to achieve incremental sequence construction with
> linear time
> > complexity, but it does depend on your using coding patterns that the
> optimizer recognizes.
>
> I was wondering why there is no container for vectors or doubly linked
> lists shipped with XQUERY ? It sounds strange to me, because there exists a
> W3C recommendation of maps, as well as interpreters implementing them. Maps
> (even immutable ones like Phil's Bagwell) are indeed implemented using
> stacks as far as I know.
>
>
> I'm not sure you can do anything useful with a doubly-linked list in a
> language where values are immutable.
>
> There might well be scope for pragmas to suggest how particular data (e.g.
> variables) should be optimized for efficiency, but XQuery comes from the
> world of database query languages where the theory is that optimization is
> the job of the system, not the of the programmer.
>
> This does have the effect that performance characteristics can vary widely
> across implementations, for example subscripting $seq[N] takes linear time
> in some implementations and constant time in others.
>
> Michael Kay
> Saxonica
>
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to