Menu

#1 #define ⇒ enum?

open
nobody
None
5
2010-01-24
2010-01-24
No

Would you like to replace more defines for constant values by enumerations to stress their relationships?
http://libdbi.cvs.sourceforge.net/viewvc/libdbi/libdbi/include/dbi/dbi.h.in?revision=1.8&view=markup

Discussion

  • Markus Hoenicka

    Markus Hoenicka - 2010-01-24

    I would appreciate if you could be more specific here. The best way is to provide a patch against the current version so it is easy for everyone to see which defines you'd like to change, and what the benefits are going to be.

     
  • Markus Elfring

    Markus Elfring - 2010-01-24

    The benefits are the following.
    1. Symbols like "DBI_TYPE_...", "DBI_INTEGER_..." and "DBI_DECIMAL_" can be clearly displayed in a debugger.
    2. Enumerations provide further data types that can be reused.

    Which names would you choose for corresponding identifiers?

     

Log in to post a comment.