Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!jarthur!nntp-server.caltech.edu!seismo.gps.caltech.edu!bruce From: bruce@seismo.gps.caltech.edu (Bruce Worden) Newsgroups: comp.lang.c Subject: Re: Assignment in test: OK? Message-ID: <1990Sep17.220836.11501@laguna.ccsf.caltech.edu> Date: 17 Sep 90 22:08:36 GMT References: <1990Sep12.194753.9808@laguna.ccsf.caltech.edu> <3749@goanna.cs.rmit.oz.au> <1990Sep13.230805.19720@laguna.ccsf.caltech.edu> <14316:Sep1511:00:2390@kramden.acf.nyu.edu> Sender: bruce@seismo.gps.caltech.edu (Bruce Worden) Organization: California Institute of Technology, CA Lines: 22 In article <14316:Sep1511:00:2390@kramden.acf.nyu.edu> brnstnd@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@seismo.gps.caltech.edu 252-21 Seismological Laboratory, Caltech, Pasadena, CA 91125