| PLEX86 | ||
Where should the type information be 140Herman, YES, they are right in the spec, along with the different operators to be used on them. && is fundamentally different than &. I am just proposing that the compiler complain when you use the wrong logical-boolean operator for the type of argument. If you aren't now doing this, then your code will only run on some subset of C implementations, and even on these it will run slower. Don't you use bit-wise logical operators to manipulate words of bits, and boolean operators to make gross boolean determinations from whole words? In some implementations, boolean operators on bit-wise logical operands produces unpredictable results, and using bit-wise operators on boolean operands has no benefit. Sure, lots of programmers confuse these VERY similar operators, which is why the compiler should complain rather than quietly producing wrong answers or inefficient code. Note that even with the restrictions that I am proposing, you can STILL defeat them simply by appropriately casting the arguments to the inappropriate operators. All that I am asking is that if you are going to write a nonsensical looking statement, that you give SOME indication to the compiler that it is not just a mistake. I don't know about you, but I welcome all of the garbage detection that I can get. Where should the type information be 141 On Wed, 30 Mar 2005 22:53:54 -0700, Steve Well, yes, they are different, and do different things. The first is a conditional operator, much like an if() that returns a... Steve Richfie1d
|
||||
Where should the type information be 141 Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
operator precedence was: Where should the type information be Keywords |
||||