[Bug 10089] New: Missing functions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10089

           Summary: Missing functions
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 1.1
        AssignedTo: mike@saxonica.com
        ReportedBy: dnovatchev@gmail.com
         QAContact: public-qt-comments@w3.org


The following functions are missing from the F&O document. Most of them are
defined as operators, however operators are not really functions. 

Operators cannot be manipulated as functions (passed as parameters, returned as
results, partially-applied, ..., etc). Due to this problem we end up with
well-defined and useful HOF facility that is not applicable to many important
functions, only because they are not defined as functions in the document.

Thus, for a higher order function that has as arguments: 
  1. a function of two arguments 
  2. item1
  3. item2

The following functions can never be passed as the value of the first argument:
eq(), ne(), =(), !=(), lt(), gt(), ge(), le(), or(), 
and(), ..., etc. 

Isn't it strange that we have defined these for dates and durations but lack
the appropriate function definitions for arguments of all other types?

A small part of the listed missing functions are new in the sense that they are
not defined even as operators, but are still important and often included in
other languages.

Here is the more or less complete list of missing functions:

(Polymorphic) comparison functions:

   eq()        -- the "eq" operator

   ne()        -- the "ne" operator

   lt()        -- the "lt" operator

   gt()        -- the "gt" operator

   le()        -- the "le" operator

   ge()        -- the "ge" operator

Boolean functions:

   or()        -- the "or" operator

   and()       -- the "and" operator

   xor()       -- new, logical xor

   implies()   -- new, logical implication.

Set functions:

   union()             -- the "|" operator

   intersection()      -- the "intersect" operator

   difference()        -- the "except" operator

   symmetric-difference() -- new, set symmetric difference

   is-subset-of()      -- new, set inclusion.

   is-true-subset-of() -- new, true set inclusion.

   is-member-of()      -- new, membership of an item to a set.

   set-product()       -- new, Carthesian product.

Functions on functions:

   apply()             -- the function application operator "()"


Functions on sequences:

   concat-sequence()   -- the "," operator

   item-at()           -- the "[]" operator

   filter()            -- the "[]" operator

Functions on nodes:

   is-same-node()      -- the "is" operator

   document-ordered()  -- the "<<" and the ">>" operators



Proposed action: Either define the functions listed above, or specify that the
operators that are already defined in the document are functions in full right
and can be manipulated as such; then define only the functions that are marked
"new" in the above list.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 5 July 2010 18:26:32 UTC