Project directory structure

Dirk Hohndel dirk at hohndel.org
Thu Apr 4 08:33:27 PDT 2013


On Apr 4, 2013, at 8:14 AM, Lubomir I. Ivanov wrote:
> i like what Dirk proposes to keep the .c files (logic) in the linux
> kernel coding style and leave .cpp part (UI) in a more Qt/C++ish
> style. a mixture between the two in a .cpp file, i don't particularly
> like:
> 
> m_someMember <- could be mSomeMember
> INTERFACE_SomeMethodName_start <- bad idea
> some_member_functino <- leave that to Qt under the hood, use someMemberFunction
> some_global_function <- perhaps should be someGlobalFunction in a .cpp
> file and the former in a .c file

I think a function (or variable) name style (camelCase or under_score) 
is then determined by where the function (or variable) is defined. If it 
is C code called from C++ it should be under_score. If it is C++ called 
from C (I think the current plan is not to have this) then it would be 
camelCase.

So yes, that will mean some mixed code but that's unavoidable.

> btw, i really did propose a short discussion about the coding style.
> with smart around it can be agreed upon usually in a couple of days...

I don't think this has anything to do with 'smart'. It's how flexible people 
are that makes the difference here. If both sides are smart and stubborn
this can take forever (been there, done that).

But I think we have this all mostly settled:

Reasonably consistent indentation and whitespace handling everywhere.
camelCase in C++
under_score in C
Point of origin (where it is defined) determines which in case it's used in
both parts of the code.

We have the Menu structure mostly settled (the Edit menu is still an option).

We decided that the core logic becomes a library to be called from the UI.

Is there anything else that needs to be decided before people can dig in
deeper? I know that Tomaz and Alberto have talked about working together
but haven't seen an announcement of a current tree anywhere.

Also, do Qt people want the old timers to help separate out the core logic
into a library?
I'm not sure what would be helpful to you.

/D



More information about the subsurface mailing list