W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2008

[Bug 5459] [FS] Static type analysis for the fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Feb 2008 10:44:28 +0000
To: public-qt-comments@w3.org
Message-Id: <E1JPy3Q-0007oE-0I@wiggum.w3.org>


------- Comment #5 from oliver@cbcl.co.uk  2008-02-15 10:44 -------
I think it may be sufficient just to consider the types making up the union of
the prime type, and not all combinations thereof.

With all these functions it is only possible to get a particular return type if
one of the arguments is of that type - for example fn:min only returns
xs:double if at least one argument is of type xs:double (or a type deriving
from xs:double)

This way the static typing rules are directly analogous to those given in
section C.2 for overloaded functions.  If you view for example fn:sum as a
series of calls to fs:plus (which as far as I can tell is semantically the
same) then it makes sense to apply the same static typing rules.
Received on Friday, 15 February 2008 10:44:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:35 UTC