Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: Boolean Operators Slighted in C Message-ID: <5401@alice.uUCp> Date: Mon, 5-May-86 14:35:49 EDT Article-I.D.: alice.5401 Posted: Mon May 5 14:35:49 1986 Date-Received: Tue, 6-May-86 06:42:02 EDT References: <12329@ucla-cs.ARPA> Organization: Bell Labs, Murray Hill Lines: 30 >>Btw, you can't have *all* operators extended with "=". How would you write >>"v = v < e;"? (Not that it's useful.) > I think it's useful! As written, of course, it's semantically invalid, > but what you really mean is "v <= e" (sic) or, to demonstrate where it's > really useful, > array[horrendous] [subscript] [list] <= bigexpr; > rather than > if (array[h][s][l] < bigexpr) array[h][s][l] = bigexpr; > Now "<=" already means something else so this syntax is not acceptable. > How about "v < = e" with a mandatory blank? This is atrocious human > engineering but at least is parseable. Anybody have any better ideas? You have suggested that v < = e should mean if (v < e) v = e but this is not parallel to the other `=' operators. Instead, if it means anything at all it should mean v = v < e In other words, afterwards v is either 1 or 0 depending on the value of e and the previous value of v. But I can't imagine when I'd ever want to use this in practice. Maybe we should just leave the language alone.