On Tue, Jul 9, 2019 at 3:23 PM Mike Hommey <m...@glandium.org> wrote:

> On Tue, Jul 09, 2019 at 10:39:37AM -0400, Ehsan Akhgari wrote:
> > On Mon, Jul 8, 2019 at 11:00 PM Gerald Squelart <gsquel...@mozilla.com>
> > wrote:
> >
> > > Thank you all for some very interesting discussions so far.
> > >
> > > Even if we don't take blanket steps to avoid unsigned types in
> > > non-bitfield/modulo cases (as suggested by our newly-adopted Google
> style),
> > > at least hopefully we're now aware of their subtleties, and we can be
> more
> > > careful and deliberate in our choice of integer types in our respective
> > > domains.
> > >
> > > Coming back to my original questions, I think the first part has not
> been
> > > categorically answered yet:
> > >
> > > Do we have style rules (or folklore) against naked `int`s/`unsigned`s,
> in
> > > favor of explicitly-sized `(u)intXX_t` everywhere?
> > >
> >
> > For new code, the style guide for this question can be found here:
> > https://google.github.io/styleguide/cppguide.html#Integer_Types.  For
> > existing code, consistency with surrounding code should take precedence
> for
> > now.  I hope this answers your question.
>
> I thought we only adopted the Google style guide for formatting. Does
> everything from the guide apply now? Or only parts of it? If the latter,
> which parts? I'm surprised because I don't remember having seen a mail
> about this, and surely, I should have noticed something that'd be
> saying that class member variables names would stop beginning with m,
> and would instead finish with an underscore and be all lowercase.
>

>From the original announcement [1]:

> We will automatically enforce restrictions on formatting of whitespace
(such as indentation and braces).
> For stylistic features other than that (such as naming of functions and
#include order), Google C++ style
> will be permitted but not initially enforced, and consistency with
surrounding code should take precedence.

In other words, we should default to using Google C++ style when doing so
would not be massively more disruptive or inconsistent than the
alternative. So we're not boiling the ocean over mFoo, but preferring the
explicit integer types and citing the Google style guide is a reasonable
thing to do.

[1]
https://docs.google.com/document/d/1CTaWucldHxEri5BUB1kL4faF4prwPlBa31yHFd-l8uc/edit


>
> Mike
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to