On Thu, Dec 4, 2014 at 10:51 AM, Nicholas Nethercote <n.netherc...@gmail.com > wrote:
> On Fri, Dec 5, 2014 at 5:41 AM, Eric Rescorla <e...@rtfm.com> wrote: > > > >> I’d like to change the coding style guide to let us make out-params more > >> obvious by using an ‘o’ prefix for their name instead of an ‘a’. For > >> example, > > > > What fraction of these cases can't be distinguished by making non-out > > ref/pointer parameters const? > > The non-const-ness of a parameter is a weak, indirect indication that > it's an outparam, and one that is probably not consistent across the > codebase. I bet we have bazillions of non-const, non-outparams. > Yes, that's true, but we would continue to have bazillions of outparams which will not be named oFoo, so the absence of the o doesn't tell you it's not an outparam (and this will be the dominant case for the foreseeable future). > In contrast, Seth's suggestion would be an extremely clear indication > that a parameter is an outparam. > Yes, and because it's just a convention and not compiler enforced it can also be wrong. -Ekr _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform