Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/20/05 15:27
Read: times


 
#99739 - Precedence vs. explicitness
Responding to: ???'s previous message
Russell Bull said:
In 'Code Complete' the author maintains if you need to read the 'c' manual to figure out the precedence of the operators then your code is too hard to read. Use brackets to show what you want to do explicitly.

There was once a poster here and on other venues related to 8051 and embedded systems that berated those who used parentheses when they were not absolutely necessary, claiming that "precedence is your friend". You know, something like "real programmers rely on their unfailing memorization of precedence, grouping, association, etc." and that anybody that needs parentheses for this does not know the language well enough.

Having read the books you refer to and many more, and having experienced the coding standards of many companies, I can say that I have never come across a book or coding standard that recommends relying on precedence over the explicitness of using parentheses for expressions and sub-expressions.

List of 57 messages in thread
TopicAuthorDate
defensive coding how and why            01/01/70 00:00      
   What do you mean?            01/01/70 00:00      
      Elegant            01/01/70 00:00      
         Paradox?            01/01/70 00:00      
      clarification            01/01/70 00:00      
         Remember            01/01/70 00:00      
            Absolutely, and even then should be avoi            01/01/70 00:00      
            Absolutely, and even then should be avoi            01/01/70 00:00      
            extrodiaray?            01/01/70 00:00      
                extrodiaray?            01/01/70 00:00      
                  Goooooogle            01/01/70 00:00      
                     No, he does not            01/01/70 00:00      
                        proofreading            01/01/70 00:00      
                     Another challeneg            01/01/70 00:00      
                        another challenge            01/01/70 00:00      
               OK, I can not Spell            01/01/70 00:00      
                  this is my point            01/01/70 00:00      
                     I sure you could, But            01/01/70 00:00      
                        Really?            01/01/70 00:00      
                           professors and classes            01/01/70 00:00      
                           Really !            01/01/70 00:00      
                              Hmmm            01/01/70 00:00      
            defensive commenting            01/01/70 00:00      
         Don't know            01/01/70 00:00      
            Ok, let me get away from that word            01/01/70 00:00      
               Gotcha            01/01/70 00:00      
                  and I came to truly despise that word wh            01/01/70 00:00      
                     Just like driving            01/01/70 00:00      
            Elegant equals...            01/01/70 00:00      
               that it            01/01/70 00:00      
               Oh, how true...!            01/01/70 00:00      
                  It's never the author's problem            01/01/70 00:00      
                     I knew a person who told me about a real            01/01/70 00:00      
                        A blissful existence            01/01/70 00:00      
                  Your bugs versus my bugs (or vice versa)            01/01/70 00:00      
                     common wisdom has it that the average pr            01/01/70 00:00      
   One exception            01/01/70 00:00      
      exceptions            01/01/70 00:00      
         vice versa            01/01/70 00:00      
            what is obvious            01/01/70 00:00      
               your mileage may vary            01/01/70 00:00      
                  that is the very same            01/01/70 00:00      
                     competent            01/01/70 00:00      
                        please define "working"            01/01/70 00:00      
                           competent programming => working program            01/01/70 00:00      
   i'm new            01/01/70 00:00      
      if you move your eyeballs a bit to the l            01/01/70 00:00      
         Coding Bible            01/01/70 00:00      
            Precedence vs. explicitness            01/01/70 00:00      
   Outlaw coding!            01/01/70 00:00      
      a program it is, by definition, asynchro            01/01/70 00:00      
         Methinks the point was missed            01/01/70 00:00      
            "Easy?"            01/01/70 00:00      
            but we agree            01/01/70 00:00      
      VIPER?            01/01/70 00:00      
      What does "timing" mean?            01/01/70 00:00      
         excuse the foreigner, if he was not clea            01/01/70 00:00      

Back to Subject List