[xquery-talk] Is it possible to maintain a list of value in XQuery

Michael Sokolov msokolov at safaribooksonline.com
Thu May 16 05:56:41 PDT 2013


On 05/16/2013 08:20 AM, David Lee wrote:
> -----------
>
> This is the "Promised Land of Milk and Honey" that I have been told about ...
>
>    
Look at what has been achieved with Java byte compilation, or -- 
Javascript to ASM ! -- who would have expected that in 1995?  Well, not 
me anyway.  I tend to think this has to do with adoption ... the 
interest in Javascript now is overwhelming, and it is embedded in every 
web application in the world, in possibly the most performance-sensitive 
part of it, so more attention gets paid to improving it.  Also it 
started with a low bar, so the improvement has been impressive.  I 
suspect that with a similar amount of incentive, XQuery would get 
optimized to take advantage of processor optimizations.
>   Adding the ability to "open a crack" from the functional to procedural
> allows users to achieve optimizations simply not practical by the optimizer.  Or atleast be able to write code that they can understand.    This is why I am seriously suggesting that  XQuery and XSLT (and MAYBE XPath ... but not so convinced on xpath) be opened up *philosophically* to non-functional paradigms.   Maybe not the whole floodgate, but bits.
>
>    
Part of the reason XQuery hasn't achieved wider acceptance, in my view, 
is the whole functional mindset.  Forget for a moment about 
performance.  People program in what they like to read and write (if 
they have a choice), preferably in a language that makes it easy to 
conceptualize a solution to a problem. People who take the trouble to 
learn how to program functionally generally come to appreciate it, but 
it doesn't seem to be the most natural idiom, and for the many 
programmers, it presents real difficulties.  One might suppose this is 
due to what is learned in school, but Scheme was the teaching language 
in vogue when I was learning, and still we bred a generation of C 
programmers.  Even XSLT I think presents a barrier of this sort, 
although somehow adoption is greater - perhaps because the 
pattern-matching rules engine fits another conceptual model?

Just stating the semi-obvious: not sure what that means for "the future 
of XQuery" or whatever.

-Mike


More information about the talk mailing list