These rules generally look great. One suggestion: On Nov 5, 2012, at 8:47 AM, Geoffrey Garen wrote: > (5) Adopt the convention that any function that is not as trivial as "int x() > { return m_x; }" moves out of the class declaration.
How about we simplify this slightly to: (5) Adopt the convention that any function that is nontrivial should be moved out of the class declaration. We can give an example as to what might constitute trivial if we wish (e.g. is a one liner), but I think leaving a little wiggle room to allow developers to apply common sense would be a good thing. While moving all complex functions out of class definitions sounds good, for some small classes being able to leave some very simple functions in the class declaration might not hurt, and might make the code easier to work with. E.g.: int y() { ASSERT(m_y != BAD_VALUE); return m_y; } cheers, G.
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev