- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 28 Nov 2006 18:09:27 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4024 ------- Comment #5 from per@bothner.com 2006-11-28 18:09 ------- The static typing rules are not supposed to define a separate language. They are supposed to defined a set of computable (and hence conservative) rules for staticing determing whether an XQuery program is type-correct. Because of the limits of computability, and because we want to be conservative, sometimes static typing will reject a program that works fine. However, that is not the goal: The goal is that if we had perfect computability, then static typing would reject a program if and only if there is some set of inputs that would cause the program to fail at runtime. The distinction between the dynamic and static semantics for fn:boolean seems to violate that goal. Even for this trivial program it is unclear if it is valid: fn:boolean(<a/>, 1) Now I can see the efficiency argument for not having to test every item in a sequence. One solution is to make unspecified the result of fn:boolean on a hybrid sequence starting with a node - allow an implementation to yield either true or an error, At the very least the test-case needs to be fixed too allow it to not fail.
Received on Tuesday, 28 November 2006 18:09:36 UTC