Re: [JS-internals] C++ coding style rule for keeping class fields together

2017-09-27 Thread Cameron McCormack
On Thu, Sep 28, 2017, at 12:18 AM, Jason Orendorff wrote: > I'd like to add a style rule: in a struct/class/union, put all the fields > (that is, non-static member variables) together, at the end This sounds good. Is there any reason not to propose this as a Gecko-wide style rule? ___

Re: [JS-internals] C++ coding style rule for keeping class fields together

2017-09-27 Thread Andrew McCreight
On Wed, Sep 27, 2017 at 9:18 AM, Jason Orendorff wrote: > Hi everyone. > > I'd like to add a style rule: in a struct/class/union, put all the fields > (that is, non-static member variables) together, at the end. > > Maybe this is dumb, but while working with Rust I got used to this. Rust > doesn'

[JS-internals] C++ coding style rule for keeping class fields together

2017-09-27 Thread Jason Orendorff
Hi everyone. I'd like to add a style rule: in a struct/class/union, put all the fields (that is, non-static member variables) together, at the end. Maybe this is dumb, but while working with Rust I got used to this. Rust doesn't allow methods to be defined within a struct or enum. And wow is it e