string parsing crashes

All code submission.
Posts: 58
Joined: Fri Sep 24, 2010 7:44 am

Re: string parsing crashes

Post by MootPoint »

if you're going to use gVariable & mClassMember, I think it's only natural to be consistent and use kConstant as well. I would reserve the ALL_CAPS specifically for macros - anything that uses #define.

Const variables should be always used in place of #define SOME_VAR 42. There's no type safety in #defined values, they are compile time evaluated constructs. I'd also suggest keeping macros to a minimum where possible, since you can't debug them. But they have their uses, and I find it useful when they're ALL_CAPS to distinguish them from regular code.
Post Reply