RE: [XQuery] static typing of node comparisons

Cutting out most of the discussion about conservative static typing vs
dynamic typing. I think we have to agree to disagree on this. We will
see what the WG will say...
 
> [Michael Rys] But the dynamic typing semantics of XQuery gives you
> exactly that. I do not dispute that this is what user's most likely
> would want ("do what I mean"), but there are systems where the
> conservative static typing approach may be preferable.
> 
> [Dimitre Novatchev] David Carlisle answered this in the best possible
way
> and I am glad to repeat his statement:
> 
> <quote>
> 
>   And note again, if you operate without the conservative static
typing,
>   you do not have the issue.
> 
> This argument is simply not true, the fact that the dynamic behaviour
> has to be compatible with the currently specified static typing has
> affected the entire design of the language.

[Michael Rys] But this is not the case. The language is designed with
the dynamic behaviour in mind and then the static rules are added as an
option. The reason with min() et al accept empty sequences has NOTHING
to do with static typing. It has to do with the fact that () is kind of
similar to the relational NULL, so we tried to align the semantics of
operations on () in all the cases where XPath 1.0 compatibility was not
an issue.

I am not aware of any fundamental change to the dynamic semantics that
we did because of static typing. We may have added some additional
functions, but otherwise nothing that we did for the dynamic semantics
was forced upon us/the language because of static typing.

> Also many of us do not work in closed environments. We distribute code
> that is intended to run on any (all) systems, by unknown users.
> Anyone who tries this in the future is going to be swamped with "bug"
> reports from end users who are trying to run code on a system using
this
> static typing.

[Michael Rys] I am sure that there will be enough other differences to
make the code to run on all systems problematic. There are enough
implementation variations that you get by implementing arithmetic for
example on different platforms, that you will have to deal with that. 

> </quote>

[Michael Rys] I think that implementations will trade-off the
performance advantage of conservative static typing vs a dynamic typing
semantics in different ways. If users care enough, they will use one or
the other implementation and thus force implementers to provide what the
market place wants. My expectation is that this will be either. Users
that need to efficiently query large amounts of data will opt for the
conservative static typing, users that want to get easier
programmability will use dynamic typing (supported by some static
rules). I think that providing both modi to the user in a way that any
query that runs dynamically typed, will either error or return the same
result on a conservative typing system is a good design to provide both
capabilities.

Best regards
Michael
 
> 
> Best regards,
> 
> Dimitre Novatchev.
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/

Received on Tuesday, 2 December 2003 13:25:44 UTC