[Bug 4939] [FO] Specify both "fn:f(a as t?) as r?" and "fn:f(a as t) as r"

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





------- Comment #1 from mike@saxonica.com  2007-08-09 22:11 -------
Personal (and interim) response:

(a) extra rules for static type checking belong in the formal semantics
document, not in the F+O specification.

(b) I think we relaxed the static typing rules sufficiently to allow products
to make type inferences beyond those that we list in the FS specification.
There's vast scope for this, and I think that encoding everything that one can
deduce about the return type within the signature would not be possible or
helpful. It's true that there are some common patterns - such as "if arg0 is
empty then result is empty" or "result is of the same type as arg0", but there
are also many more subtle variations, especially if your static analysis is
interested in static properties other than the type, which seems rather likely
in a real product, but is well outside the scope of the specification.

Received on Thursday, 9 August 2007 22:11:16 UTC