RE: ACTION A-617-01 Jonathan to bring discussion of bug 29119 to the mailing list

Mike Kay wrote:

>> In the query of XPath / XQuery per se, is there ever a need to allow xs:error
>> as a sequence type?

> We don’t allow it because there is a use case, we allow it because there is no reason not to. 
> We don’t disallow multiplication by zero just because we can’t see why anyone would want 
> to do it. Orthogonality drives the design here: no unnecessary restrictions.

We disallow it for variable bindings (type error), but allow it for all other uses of sequence type.

It's too late in the game to convince me to change this, but I think it would be more orthogonal to either make it a type error wherever it is used as a sequence type, since it can never match an instance, or to allow it in all cases.  I don't think the status quo is badly wrong, but if we had caught this earlier, I think we could have improved it.

Jonathan




Received on Tuesday, 29 September 2015 10:45:59 UTC