Re: The IDS, the EDS and the DBMS

From: Marshall Spight <mspight_at_dnai.com>
Date: Sat, 11 Sep 2004 06:31:24 GMT
Message-ID: <0Zw0d.24024$D%.19457_at_attbi_s51>


"Laconic2" <laconic2_at_comcast.net> wrote in message news:4OWdnRt206EE_N_cRVn-qw_at_comcast.com...
>
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:Ess0d.18407$MQ5.89_at_attbi_s52...
>
> > There are two camps in the typing wars, and they don't get
> > along much. :-) But I'm decidedly a static type advocate.
> > I actually want to determine as much as possible at compile
> > time.
> >
> > Said more generally, I want to be able to express constraints
> > in my source code, and have the compiler tell me of as many
> > as it can, whether they hold or not. If they hold, the compiler
> > doesn't need to insert code to check them. If they do not hold,
> > then my program is erroneous. "Variable x has type int" is a
> > constraint, although we often do not consider it as such.
> >
> > Can we prove all constraints statically? No, we cannot;
> > some are undecidable, and those we must check at runtime.
> >
> > The static camp says that's okay, every one you find ahead
> > of time is a bug prevented. The dynamic camp says, screw it,
> > you have to insert lots of runtime checks anyway; let's just
> > use the one mechanism.
>
> Thanks for the explanation.
>
> I don't think I'll join either camp.
>
> I'm more interested in data, anyway.

Ah, but while I applaud the desire to avoid joining camps, you cannot escape the choice; it is with you everywhere you go.

It is a general aspect of the decidability of constraints. You can no more escape this than you can escape the halting problem. Nor is not making a choice possible.

This issue is somewhat made obscure by the poor quality of linkage we have today between the type systems of our embedded data access languages and our application languages. If we design an architecture where the tyo type systems cannot communicate at compile, then we have implicitly chosen dynamic checking. (jdbc, odbc.) But wouldn't you really like it if the command you embed in a jdbc execute() statement could be checked *at compile time* for correctness?

Marshall Received on Sat Sep 11 2004 - 08:31:24 CEST

Original text of this message