RE: [F&O] IBM-FO-037: Strange description of fn:unordered

unordered() is one of those functions (like key() in XSLT) where the intent
of the function is to achieve performance benefits, but the specification of
the function cannot say so. This is why the current specification is such a
mess.

The specification should say simply that the function returns an arbitrary
permutation of its input sequence.

I think it would then be a completely clean function.

However, I agree that it would still be (a) confusing to users, and (b) of
marginal usefulness. XQuery requests ordering through an ORDER BY clause in
the FLWOR expression, and I think it should request non-ordering in the same
way.

Michael Kay

# -----Original Message-----
# From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
# request@w3.org] On Behalf Of Dimitre Novatchev
# Sent: 05 March 2004 15:24
# To: Michael Rys; Don Chamberlin
# Cc: public-qt-comments@w3.org
# Subject: RE: [F&O] IBM-FO-037: Strange description of fn:unordered
# 
# 
# 
# --- Michael Rys <mrys@microsoft.com> wrote:
# > I agree with Don's comment.
# >
# > Fn:unordered() is just a non-deterministic unordering of the passed in
# > sequence. The function is not a second order function as you imply.
# 
# This is not implied by me, but by the really strange function definition
# and the answers I got to my questions about the definition of the function
# (e.g. this function is necessary in order to achieve better efficiency (of
# what?) of some unspecified processing that would be slower if it had to
# produce the sequence in order).
# 
# If I didn't understand correctly the function definition and the
# explanations, it is a fact that I was not alone in this.
# 
# > So
# > the semantics is very easy and simple.
# 
# Then its name will better be:
#   fn:unorder()
# 
# and everything I've seen about the necessity for this function in order to
# achieve better efficiency -- every such explanation is no longer true.
# 
# 
# Dimitre Novatchev.
# 
# __________________________________
# Do you Yahoo!?
# Yahoo! Search - Find what you're looking for faster
# http://search.yahoo.com

Received on Friday, 5 March 2004 12:50:28 UTC