RE: [XQuery] static typing of node comparisons

> since that would move type checking from the static typing phase into
> the dynamic phase. 

That is true of course, but the solution chosen moves the burden of type
checking, inserting explicit casts and exactly-one() all over the place,
to the user rather than the system. No one (including the authors of the
spec, as shown by this thread:-) is ever going to get this right first
time, so writing xquery is going to be a matter of trial and error
trying to passify the type checker. This completely nullifies any
potential benefits of a static type checker in catching programmer
errors early.  I say Xquery as I would expect (hope) that few xpath
implementations would use this system. It would be hard to persuade
anyone that an xpath2 using the static type feature had any benefits
over xpath1. Some extra useful functions (regexp, mainly) a lot of less
useful functions and a type system that makes using the system without
without getting errors on the first few attempts at each expression
virtually impossible.

David

Received on Monday, 1 December 2003 16:08:20 UTC