[net.lang.c] ^^, ====, and other kludges

moroney@jon.DEC (12/11/84)

It seems to me that all this discussion about new operators such as ^^ is all
caused by an oversight in the implementation of (actually lack of) booleans in
C.  If C had a strict rule that 0 is false, 1 is true and well, anything else,
you take your chances, there would not be any need for any new operators like
^^.  If the only legal value of TRUE is 1, ^^ evaluates the same as ^ in all
cases, so ^^ would be unnecessary.  Also, the only difference between && and &
would be whether the second operation would always be evaluated or not. If the
definition of ! were the same (!0==1, !anythingelse==0) then the old definition
of non-zero =true could still be used by using !!x (or x!=0) which gives TRUE
(or 1) if x!=0 and FALSE (0) if x==0.  Also a one-bit new type (boolean or
logical) could be created that used only 1 bit to determine TRUE or FALSE,
allowing the use of huge arrays of booleans using little memory. (Admittedly
not very common) 

"There's a madness to my method."		Mike Moroney
					..!decwrl!rhea!jon!moroney

ndiamond@watdaisy.UUCP (Norman Diamond) (12/14/84)

Also let's not forget that we need the assignment form of ====
which is
=====
Now, has anyone got six of them?

-- Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy@waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."