[xquery-talk] RE: [AW] XQuery and Item Orientation
gfourny at inf.ethz.ch
Sat Jan 24 20:39:51 PST 2009
I think that it is an important point that the relevance of object-
orientation features in XQuery depends on the use cases. Everybody (I
think) agrees that XQuery is very efficient and well-suited to process
XML/relational data: it was designed exactly for this. The question
here seems to be: can XQuery do more, e.g., do what Java/C++ do --
without reducing performance on pure XML processing -- and would this
be desirable at all?
My feeling is that XQuery has a considerable potential. As Hans-
Juergen Rennau mentioned it earlier, XQuery/XML/XPath was one of two
major revolutions in software development, the other being object-
oriented programming, and so I am also wondering: would it not be nice
and useful if one were able to design a seamless (i.e., XML nodes and
objects are "the same") solution cumulating the best sides of both XML
Querying and Object-orientation in a single language? Would not XQuery
be a good match for this?
The mapping suggested by Hans-Juergen Rennau following Michael Kay's
comment about patterns with user-defined priority (as an alternative
to type hierarchies for polymorphism) is interesting. I have questions
regarding this: with this approach, what kind of control would an
implementor/a user have about which function is called when? How would
this affect predictability of program execution and debugging? Does
XQuery not already have some kind of type-hierarchy-based polymorphism
(the recommendation says in 3.1.5. (Function Calls) "the rules for
SequenceType Matching permit a value of a derived type to be
substituted for a value of its base type")?
Kind regards and thanks a lot for your interesting comments,
> I think it is a question, about which use cases we talk: on a database
> I do not need these features. But in application programming, this
> would make a lot of sense. Writing a web application in Unity seems to
> me to be more comfortable than in XQuery.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk