G-Truc Creation - If I had to write C code...
Creative

If I had to write C code...

21/01/2010 - Technical / Comments / C++ >>

I am a C++ programmer and it's fair to say that my experience with C is actually limited. However, I have been working with C code lately, even if I think that code is quite pretty, I found some disturbing approaches.

So if I had to write C code, I would try to avoid
  • Using integers for enums.
  • Using macros when constants and functions could be used.
  • Using large and flat structures instead of a hierarchy of small structures.
  • Writing functions with 1000 of lines, 100 lines is already quite long.
  • Writing files with 10000 of lines, 1000 lines is already quite long.

Nothing spetacular but in practice, it is something that happen too often. Anyway, C is ok but not as fun as C++ can be!

GLM 0.8.4.4 releasedG-Truc Creation 6.2 work in progress
♥
Copyright © Christophe Riccio 2002-2010 all rights reserved