Chiming in a little late: On Jan 6, 2014, at 6:35 PM, Joshua Cranmer 🐧 <pidgeo...@gmail.com> wrote:
> I find prefixing member variables with 'm' to be useful, although I dislike > using it in POD-ish structs where all the members are public. Fully agreed, and IMO the style guide should be changed to include this. > The use of 'a' for arguments is where I am least consistent, especially as I > extremely dislike it being used for an outparam return value That also bothers me. I'd support adding an 'o' prefix for outparams. > I've never found much use for the 's', 'g', and 'k' prefixes, although that > may just as well be because I've never found much use for using those types > of variables in the first place (or when I do, it's because I'm being > dictated by other concerns instead, e.g., type traits-like coding or C++11 > polyfilling). I don't see the use in distinguishing between 's' and 'g'. They're both potentially dangerous globally-shared data, and that's the most important information the reader should know. (Except if they're immutable, of course, but then presumably they'd have a 'k' prefix.) We could classify them both as 'g', but considering the number of bugs I've seen stemming from unprotected access to these kinds of variables, I would support a more verbose and distinctive prefix like 'unsafe'. - Seth _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform