Assignment in test: OK?
Bruce Worden
bruce at seismo.gps.caltech.edu
Tue Sep 18 08:08:36 AEST 1990
In article <14316:Sep1511:00:2390 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> [ material deleted ]
>Bruce, am I right in thinking that =/:=/== would satisfy you?
Well, not really, though it is an interesting idea. I think that it might
just add to the confusion that some people already seem to be experiencing
on this issue. On that note, I was assuming that people writing `if(x = y)'
and meaning `if(x == y)' were just making some mechanical error. It has
been brought to my attention, however, that the problem may be caused by a
confusion of the `=' symbol in C with that of some other language, by
someone who regularly programs in multiple languages. In such a case the
bug would be much harder to find. While I could take a hard line and say
that anyone programming in C should know what the operators are, I will ask
a question instead: For those of you who regularly program in several
languages, how big a problem is this, and would changing `=' to `:=' really
fix it? If it turns out to be a significant problem, maybe it could be
changed. I think there is a newsgroup `cfutures' that could discuss the
change. Mr. Bernstein's suggestion could be considered as well.
--------------------------------------------------------------------------
C. Bruce Worden bruce at seismo.gps.caltech.edu
252-21 Seismological Laboratory, Caltech, Pasadena, CA 91125
More information about the Comp.lang.c
mailing list