[xquery-talk] Re: XQuery - Grammar? Implementations?

Hans-Juergen Rennau hrennau at yahoo.de
Mon Feb 2 06:48:03 PST 2009


You wrote: "Unfortunately, for reasons that I think are completely misguided, the rules
for assigning to variables are different from the rules for supplying values
to function parameters, and do not allow implicit atomization or conversion
from untypedAtomic to string."

I am not sure your criticism is justified in its harshness. At least if it is the case, as I believe, that implicit conversions may indeed interfere with optimization. (If this is not the case, please let me know, and ignore the rest of this mail.) At any rate, I would like to emphasize the huge difference of relevance which implicit conversion has for function calls on the one hand, and variable assignments on the other hand. The function conversion rules are so important for conciseness because a given function may be called from any number of places in the query and from any depth within an expression - without implicit conversion one might easily get trapped in a hideous web of brackets, hard to write, even harder to read. So nobody right in his mind would want to do without the function conversion rules. 

Declarations, on the other hand, offer a different situation, because they are not "called": only one explicit conversion per declaration may become necessary, and the expression to be converted is a top level expression, which can be comfortably wrapped in the appropriate conversion call. Therefore, the decision against implicit conversion is certainly controversial, but not as arbitrary as it may seem.

With kind regards -
Hans-Jürgen Rennau


      



More information about the talk mailing list