On Tue, Jun 23, 2015 at 9:55 PM, Jon A. Cruz <j...@osg.samsung.com> wrote:
> > Looking into it more, I think I've figured out much of that on my part > comes from C++ and other OO languages I've worked in. Especially with > C++ one should start a class declaration with a single 'public' section > followed optionally by a single 'protected' section and finally a single > 'private' section if needed. So the general structure tends to be from > higher-level first in the file down to lower-level later on. Also IDE > use can promote the "F3 to go do declaration" over manually scrolling > approach. > > Well actually C++ as initially designed certainly expected the private section to go first. It acts as though "private:" is right after the opening brace for the class. In fact the only difference between "struct" and "class" is whether there was an implied "public:" or "private:" at the start (Microsoft screwed this up by putting whether struct or class was used into the name mangling, however). I agree that the majority of C++ code now ignores this plan and puts the private section last, so that the "useful" part of the header file is first.
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel