Hi Akim,

> 1. use macros to generate structs and functions that depend on the type 
> passed as a parameter
> 
> 2. play repeated #define TYPE foo + #include "generate-the-code.h" to do the 
> same thing but without all the slashes
> 
> 3. try to have single implementation which plays with sizeof, offsetof, etc.

I see 3. as a micro-optimization that destroys maintainability. So, if you
want to apply it, do it only as the last step of the development (like
manual translation to assembly language would be).

Bruno


Reply via email to