<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 23, 2015 at 9:55 PM, Jon A. Cruz <span dir="ltr"><<a href="mailto:jonc@osg.samsung.com" target="_blank">jonc@osg.samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Looking into it more, I think I've figured out much of that on my part<br>
comes from C++ and other OO languages I've worked in. Especially with<br>
C++ one should start a class declaration with a single 'public' section<br>
followed optionally by a single 'protected' section and finally a single<br>
'private' section if needed. So the general structure tends to be from<br>
higher-level first in the file down to lower-level later on. Also IDE<br>
use can promote the "F3 to go do declaration" over manually scrolling<br>
approach.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>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).<br><br></div><div>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.<br></div></div><br></div></div>