Boolean Expressions (was: Re: Comments against TMQL draft 2006-02-22)

Lars Heuer <[email protected]> Sat, 10 Mar 2007 12:03:59 +0100
Newsgroups gmane.text.xml.xtm.tmql
Organization Semagia
Message-ID <[email protected]>
Hi Robert,

[...]
>> 4.13 Boolean Expressions
>> ------------------------
[...]
>   & symmetric, non-short circuit AND
>   && does not exist in TMQL
>   | symmetric, non-short circuit OR
>   || asymetric, short-circuit OR (can be defined via if-then-else)

> This is the same in Java, which got it from C++ which got it from C.....

> I would not advise to switch & to short-circuit because this can
> dramatically undermine automatic optimization.

Ok. IMO the boolean expr. need some more explaining words. Someone
might get the impression that you mean with "non short-circuit", that
every operant has to be evaluated even if the first operant evaluates
to "false" in an ANDed expression. That is not meant (I hope ;)).

With not short-circuit you mean, that the processor might evaluate
the operants in a boolean expression in any order it likes. But once
the proc. gets something that can be interpreted as false it can work
with the "false"-value (in an AND expression).

Best regards,
Lars
-- 
http://www.semagia.com