Lists Home |
Date Index |
Dare Obasanjo wrote:
> What you just stated doesn't jibe with any formal
> knowledge I have about types and language systems but
> since my background in formal computer science theory
> is weak I won't attempt to correct your claims.
What I am talking about: _logic_ and its foundation in set theory, was
formulated long before computers existed (e.g. starting perhaps with
Aristotle, and codified by Geog Cantor) and remains apropos today. In any
case, run, do not walk, to the bookstore, get yourself a copy of Tarski, and
read it. It has nothing to do with computers but everything to do with
classes and types and how you view the world.
> So I'll try to explain my point in lay terms. The main
> benefit of a type system is so that things can be done
> *statically* at compile time instead dynamically at
> run time. Validation is a dynamic process.
No. The main benefit of a "type system" is that individuals (e.g. individual
documents or fragments of documents) can be collected into sets based on
constraints. This is so simple and basic a concept that it should hit you
right between the eyes. No formal mumbo jumbo needed.
I think you mean "static types" but I've not used that term, and think that
is largely irrelevent to XML. It is a far too common mistake to conflate XML
which is about _data_ with programming languages which are most often about
algorithms and processes. The term "static type" has no meaning that I can
see for an XML document.
Types or classes are a basic concept, indeed if you _start_ with just
classes and a few details (e.g. cardinality) you can derive all of
mathematics, and hence all of computer science. "Validation" is a process,
an algorithm, that determines whether or not an individual is a member of
the class. That's all.
> Thus a "type system" based on validation isn't really
> type system especially to people with a programming or
> database background.
Let's just get this straight, the XQuery (or any other) "type system" is not
"based on" validation, no matter what you read or how you interpret what you
read, see above. This concept is really important so I will harp on it.
Logic is so central to computer science that this needs to be understood. I
don't mean to be condescending, but it is hard to have a meaningful
converstation unless we agree on a few principles.
> Bottom Line: The XQuery type system although onerous
> and complex does not forestall the need for
> post-update validation if/when XQuery becomes a DML
> and not just a query language. Therefore claims that a
> "type system" is necessary before update semantics can
> be added to XQuery are ill-considered.
It is _impossible_ to define the term _semantics_ without a "type system".
Every piece of software which works correctly has an _implicit_
understanding of this. The XQuery, or any other, formal semantics, is merely
an explicit, longhand, way of writing this down. The benefit of writing this
down is that there is a document that implementors and test suite developers
can go to, to decide, e.g. when two different implementations give differing
results, which is correct. In many, but not all, software applications,
correctness is desired. In such cases a formal semantics is a good thing. I
doubt these folks think they are wasting their time.