Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Assignment in test: OK? Message-ID: <1990Sep19.164308.722@zoo.toronto.edu> Organization: U of Toronto Zoology References: <14316:Sep1511:00:2390@kramden.acf.nyu.edu> <1990Sep17.220836.11501@laguna.ccsf.caltech.edu> <18063@haddock.ima.isc.com> <1335:Sep1901:50:0490@kramden.acf.nyu.edu> Date: Wed, 19 Sep 90 16:43:08 GMT In article <1335:Sep1901:50:0490@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >> `:=' is almost as clumsy to type as that >> stupid regexp notation `\( \)'. > >I agree! That's why Q lets you use = in 99% of the cases where you'd use >it in C. You only have to resort to := when you want to use the assigned >value in an expression. So why not just insist on proper parenthesization and testing of the value in an expression -- that is, the clean and readable if ((c = getchar()) != '\0') rather than the cryptic and confusing if (c = getchar()) and leave the operator alone? Then you have the further bonus that it's not a new language, just a fussier compiler. -- TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology OSI: handling yesterday's loads someday| henry@zoo.toronto.edu utzoo!henry