W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2006

[Bug 3675] fn:error(..) as an argument to another function/operator

From: <bugzilla@wiggum.w3.org>
Date: Fri, 08 Sep 2006 11:57:34 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GLezG-0003ym-M1@wiggum.w3.org>

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





------- Comment #2 from mike@saxonica.com  2006-09-08 11:57 -------
I don't normally follow static typing discussions, because I decided long ago
that the facility wasn't a good idea from a usability perspective. But surely,
using error() should never cause a static type error. The whole point of
error() is that it enables applications to detect errors dynamically, and if
the simple existence of a call on error() can cause a static failure, then
something is badly broken.

I guess this example is very artificial, a more realistic example would be

zero-or-one(if ($x=0) then error() else (1 div $x))

How does static typing handle that one?

Michael Kay
Received on Friday, 8 September 2006 11:58:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:14 UTC