W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2016

[Bug 29586] [XQ31] 2.5.6.2 The judgement subtype-itemtype(Ai, Bi)

From: <bugzilla@jessica.w3.org>
Date: Tue, 03 May 2016 10:06:53 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29586-523-FlWfKdzYgd@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29586

--- Comment #8 from Tim Mills <tim@cbcl.co.uk> ---
(In reply to John Snelson from comment #6)
> (In reply to Tim Mills from comment #3)
> > This appears to prevent a processor from using static type analysis to avoid
> > unnecessary function coercion.  For example, I think this requires that
> > 
> > function() { 1 } instance of function() as xs:integer
> > 
> > returns false.
> 
> I agree that your expression above should return false. I think it would be
> reasonable to allow an implementation to determine a stricter return type
> for the inline function using static typing if it can.
> 
> Of course, your own static typing implementation could easily carry two
> types for the inline function expression - the "official" static type, and a
> static type for the way it behaves in practice. That would allow you to
> avoid the function coercion you were worried about.

Unfortunately that would have to permeate down to every expression to get the
"right" answer. e.g.

(if (condition()) then function() { 1 }  else function() { 2 }) instance of
xs:integer

I'm lobbying to allow 

function() { 1 } instance of function() as xs:integer 

to be true or false, in the same way that 

1.3 + 0.7 instance of xs:integer 

is implementation defined.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 3 May 2016 10:07:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 May 2016 10:07:01 UTC