Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Stylistic choices

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

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?

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-12-13 5:53

>>33
I don't split my code this is counter-productive: my code is integrated, single-form procedural action which uses all parts of itself.
Splitting code is importing defective OOP shit from sepples, trying to make "Object Modules" from raw .C files and "Link the modules".
Suffice to say, my single file+headers always compiles fast(DMC is way faster than GCC btw), it doesn't need such OOP mess as thousands of tiny .c/.o files

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List