[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


    Date: 23 Jul 1982 23:22 PDT
    From: JonL at PARC-MAXC
    Re:   boole, and the still pending name problem - Q & A

    Seriously, what are some examples that support the need for a *functional*
    BOOLE?  (other than general backwards compatibility,  and as Moon points
    out, the documented version doesn't even satisfy that.)

(Boole a (Boole b x y) (Boole c x y)) = (Boole (Boole a b c) x y)

This identity illustrates the fact that the first argument to Boole is more
than just an index into a table of operations.  It demonstrates how one might
assemble a Boolean operation from pieces at runtime.  I have done it.  In the
light of this I don't think that Boole is so obviously worthless.

I suspect the fact that the definition of Boole in the draft manual only allows
three arguments is to avoid all the issues about just what multiple-argument
Boole is supposed to do.  Since you only want to call Boole in the case where
you don't know which Boolen operation you will be performing, and since in
general that means you don't know if the operation is associative or not, and
since NOBODY can remember which way Boole associates, I can't see that anyone
trying to write clear code would ever want to use anything other than
3-argument Boole.  (Note, please, that logand, logxor, etc. are all defined to
take any number of arguments.)