- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Sat, 11 Oct 2003 15:53:51 +0200
- To: Dimitre Novatchev <dnovatchev@yahoo.com>, public-qt-comments@w3.org
Received on Saturday, 11 October 2003 09:55:28 UTC
> > The functions max(), min(), and avg() are defined to accept a > first argument of type: > > xdt:anyAtomicType* > > On the other side, asking for the maximum, minimum or the > average of an empty sequence clearly doesn't make sense. > Other programming languages also require that the argument of > max should be a non-empty list (e.g. Haskell's prelude.hs) > > The type of the first argument of these functions must be: > > xdt:anyAtomicType+ > We debated whether to do this, and decided that min() and max() of an empty sequence should return () rather than being an error. This is consistent with the general approach to handling of (), and is easier on the user given that we have no try/catch capability to make errors non-fatal. Michael Kay
Received on Saturday, 11 October 2003 09:55:28 UTC