[xquery-talk] XQuery and the Rule of Least Power

Jonathan Robie jonathan.robie at datadirect.com
Tue Mar 7 10:08:34 PST 2006

I just read the TAG finding called "The Rule of Least Power" [1], and I 
find it difficult to know how to apply it to XQuery. The following 
statement is central to the paper:

> The Turing-complete languages are shown by computer science to be 
> equivalent in their ability to compute any result of which a computer 
> is capable, and are in that sense the most powerful class of languages 
> for computers. The tradeoff for such power is that you typically 
> cannot determine what a program in a Turing-complete language will do 
> without actually running it. Indeed, you often cannot tell in advance 
> whether such a program will even reach the point of producing useful 
> output.

Although XQuery is Turing complete, all it can do is return values, and 
if you have a static type system, you also know an awful lot about what 
values it is going to return. Any thoughts on how this Rule applies to 
deciding whether to use XQuery for a given project? Or does XQuery 
violate the Rule proposed here?


[1] http://www.w3.org/2001/tag/doc/leastPower.html

Read my Blog: http://blogs.datadirect.com/jonathan_robie/
Learn XQuery: http://media.datadirect.com/download/docs/ddxquery/tutorial_query.html
Learn XQJ (the JDBC for XQuery): http://www.datadirect.com/developer/xquery/topics/xqj_tutorial/
Get DataDirect XQuery: http://www.datadirect.com/products/xquery/

More information about the talk mailing list