Newsgroups: alt.flame Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: == vs = Message-ID: <1988Mar11.215800.1096@utzoo.uucp> Organization: U of Toronto Zoology References: <11216@brl-adm.ARPA> <2111@chinet.UUCP> Date: Fri, 11 Mar 88 21:58:00 GMT > ... We believe the use of the "=" > operator in C, in conditionals, in the real world context of its many > meanings in many uses, is dangerous and error prone. So fix your compiler to object to assignment in a context where a boolean value is wanted. That is a full, complete solution, without any change to the language whatsoever. It removes the danger without requiring that all existing code be scrapped. I agree that in the absence of such a "guard rail", C's use of the = operator is dangerous. Whether it is seriously error-prone depends on the programmer. (I have had trouble with it once in the last several years.) However, given some protection against dangerous misuse, there is nothing intrinsically vile about C's choice of operator syntax; it takes a bit of learning, and once learned is not a problem. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry