Min/max and bool

BALDWIN mike at whuxl.UUCP
Wed May 28 07:41:11 AEST 1986


Re: new? min and max ops
>>>o Min and max operators.  These would get used all over the place.  These
>>>should be usable to the left of the assignment operator, as most but not all
>>>C operators are.

The PDP-11 C compiler had two operators /\ and \/ whose names in the compiler
had something to do with MAX and MIN, I believe.  Unfortunately, they weren't
really implemented -- they were parsed but that's as far as it got.

Re: builtin bool type
>I'm not sure why not.  Assuming all the implicit int/bool conversions stay,
>I think the only problems are (a) it isn't really necessary, and (b) it adds
>a new reserved word (breaking any programs that use "typedef int bool"!).

(a) is the biggie.  Why add bool when "typedef enum { FALSE, TRUE } bool;"
works fine?  (Relying on ANSI C's treatment of enums as real ints)
-- 
						Michael Baldwin
			(not the opinions of)	AT&T Bell Laboratories
						{at&t}!whuxl!mike



More information about the Comp.lang.c mailing list