On Wed, Jan 08, 2014 at 02:24:46PM -0500, Ehsan Akhgari wrote:
> On 1/7/2014, 7:00 PM, Cameron McCormack wrote:
> >Ehsan Akhgari wrote:
> >>Exactly. If we require braces on their own lines for function bodies
> >>everywhere, we wouldn't need to solve this!
> >
> >Are you sure? :)  There are a bunch of instances of
> >
> >   class A
> >   {
> >     A(int aMember)
> >       : mMember(aMamber)
> >     {}
> >   };
> >
> >through the tree.  Depends how the "braces on new line" rule is written,
> >of course.
> 
> I guess the "close braces for function bodies on their own line"
> rule is implied.  But you're right, we should be explicit about
> that!

I'd argue we should have some sort of exception here because  otherwise
short ctors are unreasonably long and less readable because there's more
there.  For example you go from

public:
  Foo() mFoo(0) {}

to
  public:
  Foo()
    : mFoo(0)
  {
  }

  which takes a lot more lines for no good purpose.

  Trev

    
> _______________________________________________
> 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