PRECEDENT FOR USE OF =

brooks at lll-crg.UUCP brooks at lll-crg.UUCP
Sun Jul 13 10:11:41 AEST 1986


>= for assignment is one of many flaws in C syntax.  Combined with the
>absence of a Boolean type, it is a considerable source of errors in C
>code.  Lint should warn the user of every occurrence of "if (a = b)".
Not a bad idea.  I don't write this as a matter of policy and I would
not mind lint giving a warning.  You could even have a flag control it.
>
>(I predict that at least one C-worshipper will say "*real* C programmers,
>as opposed to quiche-eaters, don't make that mistake."  I think they're
It is true that real programmers don't make mistakes and don't eat
quiche either.  It has nothing to do with C.

Real programmers don't spend their time complaining about using = for
assignment either.



More information about the Comp.lang.c mailing list