Re: So what's null then if it's not nothing?

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 19 Dec 2005 13:11:51 +0100
Message-ID: <MPG.1e10c1f0da15f45498975a_at_news.ntnu.no>


In article <1134991202.807776.49030_at_g14g2000cwa.googlegroups.com>, boston103_at_hotmail.com says...
>
> > "2 + NULL" is not a valid expression.
>
> So what is your expression interpreter is supposed to do when it
> encounters expressions like that ? Throw an exception ?

Yes. Say "Unknown symbol: 'NULL'" or something like it.

> You are contradicting yourself, or your definition of 'valid' differs
> from the usual one. If the null 'propagates', then the expression
> '2+NULL' is agreeable to the expression evaluator (valid), in which
> case the question stands, what is '+' in the expression ?

No. "2 + NULL" is not a valid expression, but "2 + X", where X is an integer variable, is. If IS_NULL(X) is TRUE, then so is IS_NULL(2 + X).

> > Hopefully, endless discussions such as this one are avoided. As you
> > might remember, the presence of null/w in a truth table was your
> > principal argument against my interpretation of Codd.
>
> How do you avoid NULL presence in a truth table ?

Um... By not putting it in there? Admittedly, it is easier if null propagates even in the face of "FALSE AND X" and "TRUE OR X". Which, by the way, there is precedent for in several programming languages: In Java, "true | booleanMethod()" does not necessarily evaluate to true.

-- 
Jon
Received on Mon Dec 19 2005 - 13:11:51 CET

Original text of this message