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

108525Re: KISS

Expand Messages
  • Kevin Wheatley
    Jul 4 2:32 AM
      Ian Collins wrote:
      > Or the simplest form:
      > memset( score, 0, sizeof(score) );
      > Would that score high for simplicity, or low for obscurity?
      > To an experienced programmer, it is clear, efficient and concise, to a
      > novice more than a little cryptic. The joys of C.

      well the problem I have with this is that if you switched to floating
      point scores this might still work, but leaves you with a problem if
      you find your self with non IEEE floats on any particular platform.
      Your making an assumption about the underlying representation in
      memory of the types. Whilst its correct most of the time its poor in
      terms of robustness.

      This would be pretty poor C++ code especially with templates (generics
      in Java) making that switch to float real easy.

      | Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this |
      | Senior Technology | My employer for certain |
      | And Network Systems Architect | Not even myself |
    • Show all 17 messages in this topic