Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] How to code an infinite loop (was: What do you thinkabout these two coding idioms?)

Expand Messages
  • azami@speakeasy.net
    ... lines I ... prefer ... Yes. I think someone is more likely to know that 1 evaluates to truth in C boolean expressions than they are to know that for(;;)
    Message 1 of 31 , Mar 1, 2001
    • 0 Attachment
      --- In extremeprogramming@y..., "Joshua Macy/Towers Perrin"
      > measures of readability. Justifications commonly run along the
      lines "I
      > have no trouble with X, but I worry that other people might, so I
      prefer
      > Y."

      Yes. I think someone is more likely to know that 1 evaluates to truth
      in C boolean expressions than they are to know that for(;;) loops
      infinitely. But if you use "TRUE" or "true" (define it as a const or
      macro if your language doesn't support it natively), your expression
      becomes very difficult to misunderstand - even for a programmer who's
      never seen C code before!
    • azami@speakeasy.net
      ... lines I ... prefer ... Yes. I think someone is more likely to know that 1 evaluates to truth in C boolean expressions than they are to know that for(;;)
      Message 31 of 31 , Mar 1, 2001
      • 0 Attachment
        --- In extremeprogramming@y..., "Joshua Macy/Towers Perrin"
        > measures of readability. Justifications commonly run along the
        lines "I
        > have no trouble with X, but I worry that other people might, so I
        prefer
        > Y."

        Yes. I think someone is more likely to know that 1 evaluates to truth
        in C boolean expressions than they are to know that for(;;) loops
        infinitely. But if you use "TRUE" or "true" (define it as a const or
        macro if your language doesn't support it natively), your expression
        becomes very difficult to misunderstand - even for a programmer who's
        never seen C code before!
      Your message has been successfully submitted and would be delivered to recipients shortly.