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

[Bug 3818] Static typing of $input-context1/works[1]/employee[1]/empnum[1]

From: <bugzilla@wiggum.w3.org>
Date: Thu, 02 Nov 2006 17:45:31 +0000
To: public-qt-comments@w3.org
Message-Id: <E1Gfgd9-0000oj-2v@wiggum.w3.org>


------- Comment #4 from tim@cbcl.co.uk  2006-11-02 17:45 -------
If not, then a whole bunch of XQTS tests will fail static typing.

My reading of "treat as" is that its purpose is to ensure that its argument
type is at least a subtype of the specified type, i.e. a narrowing of the type
from type T to type S where T is a subtype of S.  Would there ever be any
reason to use "treat as" to broaden a type from type S to type T?

The use as a type narrower adds type information.  Use as a type broadener
throws away type information.  Is that ever helpful?
Received on Thursday, 2 November 2006 17:45:47 UTC

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