[xquery-talk] static typing of XQuery?
mcarey at bea.com
Wed Sep 20 22:14:18 PDT 2006
BEA also does optimistic static typing.
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On
Behalf Of Per Bothner
Sent: Wednesday, September 20, 2006 12:45 PM
To: Michael Kay
Cc: talk at x-query.com
Subject: Re: [xquery-talk] static typing of XQuery?
Michael Kay wrote:
> Per Bothner wrote:
>> How much interest is there in the "static typing" feature?
> There seem to be two clusters of interest in it: (a) Microsoft, and
Interesting; I didn't realize Microsoft was so interested. The FS
specification lists 2 Microsoft names, which is the same as the
number of IBM names, so for outsiders it would not be obvious.
> I think that schemaless data is an important use case, and in my view
> pessimistic static typing is unusable with schemaless data.
My thinking, too.
> Doing pessimistic static typing for schema-aware queries is more
> but there are still many cases where intermediate results are likely
> untyped. My advice would be to steer well clear. Optimistic static
> (reporting errors only where the static type is disjoint from the
> type), as implemented in Saxon, seems to be quite good at catching a
> class of programming mistakes.
Does Saxon implement full "optimistic static typing" or just some ad-hoc
subset? By the former I mean the type system of the FS but, but with
more lenience ("optimism")? If so, it seems that implementing full
static type checking should not be difficult.
My feeling (which seems to match yours) is that optimistic static
typing is useful and should perhaps be the default (pending further
experience), but pessimistic/strict typing would be nice to have as an
option for those who want it, but should not be the default.
per at bothner.com http://per.bothner.com/
talk at x-query.com
More information about the talk