Name: Anonymous 2011-12-13 3:18
I tend to prefer to use namespaces filled with constants, rather than using enums in most cases. For example using
instead of
Is this bad practice?
namespace Element {
const uint8_t No_Element = 0;
const uint8_t Air = 1;
const uint8_t Water = 2;
const uint8_t Earth = 3;
const uint8_t Fire = 4;
};instead of
enum Element {
No_Element, Air, Water, Earth, Fire
};Is this bad practice?