brentoboy - 2005-03-23

a lot of languages actually create a variable when you define a constant, and then protect it from being written to. While I understand that for more complicated data types, this might be acceptable, I like the #define method of creating constants in C, because it doesnt add any more size to the end EXE and it doesnt use memory just because it gets defined.

I've seen sample code in VB that doesnt define all the constants related to an API function because they dont use them all, and they dont want to use up extra space/memory. - we need to avoid that, liberal use of constants is a GOOD thing.

I understand that sometimes a constant variable is needed instead of a preprocessor "swap-out" of a literal. But lets use the same syntax, and let the compiler decide what to do in each case.

Also,
Lets enforce the use of ALL_CAPS in the name of a constant.  And, conversely, lets enforce the reverse that variables cannot be all caps.  That way we can be sure as we read the code that our assumptions about what kind of variable we are working with are true.