Path: utzoo!mnetor!uunet!husc6!yale!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Another issue in the = and == war (you wanna read this) Message-ID: <7070@brl-smoke.ARPA> Date: 13 Jan 88 06:59:16 GMT References: <1168@ark.cs.vu.nl> Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <1168@ark.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: > So, why is the priority of `=' chosen to be less than the priority of > `==' (in this case `!=') ? Some of the precedence choices for C (p.49 of K&R) are admittedly poor, mostly those involving bitwise and shift operators. They can't be changed at this point; too much correctly-written code would be invalidated. I fairly often write things like bool done; /* ... */ done = nextp == NULL; In general, it is good for assignment to have very low precedence.