Re: (TC304.2308) translating logical operators

From: Alain LaBonté  (
Date: Fri Jun 09 2000 - 11:09:45 EDT

À 09:58 2000-06-09 -0400, François Pinard a écrit:
>Tom Garland <> writes:
> > TC304. Does anyone know if the following logical operators are globally
> > understood or must they be translated for each language?
> > AND
> > OR
> > ~ (not)

>There was a discussion on the Python list, last week, on the fact that
>these operators do not have a clear intuitive meaning, even in English.
>Yet for old-fashioned programmers, this is generally clear. It was said
>that some programming language (I forgot which) allows `and then' and
>`or else' as an attempt to make things more clear.

[Alain] Right. Of course, when we talk about antedeluvian programming
languages, translation is not absolutely required. Habits are already taken
and in practice it is not worth it (in addition to the fact that some
programmers prefer that their comments, in their native language, be not
confused with the cryptic -- and mechanically interpreted -- actually
programmed instructions per se).

    However for any new *application*, boolean operators and mathematical
functions in general exist in different languages already (mathematics were
not invented yesterday). Therefore, if a product is aimed at end-users who
already have a culture (who has none?) versions in different languages
should typically be required (maybe not in some cases, you have to survey
those languages speakers).

    As François says, for example, the meaning of "OR" ("OU" en français)
is also ambiguous due to bad practices encouraged by many users (in both
English and French, "OR" ("OU") is by definition an inclusive OR but many
consider it rather means "EITHER x OR y" ("SOIT x, SOIT y"), which is
exclusive, to the point that they use the bad formula "and/or" ("et/ou") to
make sure that "OR" will be even more ambiguous in the future -- I think
damage is already done to both of these human languages).

    Even "AND" ("ET" en français) may lead to misunderstanding, as the
natural language use of these operators may *not correspond* to the boolean

    Many years ago, in a "natural-language"-to-data-base interface, just to
play (I know, it was vicious), I asked the following natural language
sentence to the program called "Intellect" (at the time, it was on an IBM
mainframe): "How many men and women are listed in the database?"... After
many minutes going trough a relatively big database, I got the single
answer: 0 (i.e. ZERO)... (%=

    The program had provided me with the translation into a data-base
programming language and it had done something like: "IF SEX=MALE AND
SEX=FEMALE THEN..." Of course an optimizer could have known the answer in
advance, it was not very clever programming... However how many users would
believe what a machine would answer in those occasions? Unfortunately most
non-programmers, to whatever question.

    That is the problem I see. A big one. So yes, operators should be
translated, explained, and even presented to end-users with a tutorial
explaining the usual traps. This, even for English-speaking end-users. It
is a matter of good user-machine interface. The user must be aware in
advance of the kind of commitment he/she has contracted with the machine.
So far we assume too much on both sides (programmers and end-users), only
the machine is strightforward... "Garbage in, garbage out" is still quite
of age.

Alain LaBonté

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:03 EDT