[PATCH v4 1/6] Added simple unit/integration test framework and corresponding test program.

Jon A. Cruz jonc at osg.samsung.com
Wed Jun 24 09:57:28 PDT 2015


On 06/24/2015 09:32 AM, Bill Spitzak wrote:
> On Tue, Jun 23, 2015 at 9:55 PM, Jon A. Cruz <jonc at 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.
> 


Yes... plans never survive first contact with the enemy.

C++ also was not designed with a good concept of interfaces. Thankfully
programmers migrated the practice from other languages and 'empty' MI of
abstract base classes can easily fulfil that role.

-- 
Jon A. Cruz - Senior Open Source Developer
Samsung Open Source Group
jonc at osg.samsung.com


More information about the wayland-devel mailing list