Bobby Holley writes: > On Wed, Jul 8, 2015 at 3:52 AM, Gabor Krizsanits <gkrizsan...@mozilla.com> > wrote: > >> The priority is to automatically rewrite our source with a unified style. >>> foo -> aFoo is reasonably safe, whereas aFoo->foo is not, at least with >>> the >>> current tools. So we either need to combine the rewrite tools with static >>> analysis, or just go with aFoo. >>> _______________________________________________ >>> dev-platform mailing list >>> dev-platform@lists.mozilla.org >>> https://lists.mozilla.org/listinfo/dev-platform >>> >> >> +1 for consistency. > > At the risk of mostly repeating myself, I want to emphasize once more that: > (1) We have already made the decision (in other threads) that consistency > trumps everything else.
If I hear correctly, it sounds like Jeff is arguing that it is not always helpful to know that a variable is a parameter, and so it shouldn't be a requirement that parameters are always named to indicate that they are a parameter. If I were to always use "firstObject" for the name of the first object of immediate relevance, then this would be consistent naming. If there is only one object, then "firstObject" would still be a consistent name, but I wouldn't say that using the name "object" is inconsistent. When it is helpful to know that a variable is a parameter then consistency in the convention to identify parameters is helpful. If it is not necessary to indicate that the variable is a parameter, then it doesn't matter. If we choose the conversion to remove existing 'a' prefixes, then we would need to either automatically move to a different naming convention that clearly identifies the purposes of the variables (out params as non-const references, and maybe pointers may be specially indicated) or manually go through and work out what names to give the variables that would benefit from clear identification. The scope of the manual process of course makes this impractical. I think we could relax the 'a' prefix requirement to be a convention used when identifying the variable as a parameter is useful. My opinion is that this is useful for most parameters in all non-trivial functions, but others disagree. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform