[gmx-developers] GROMACS C++ coding style

David van der Spoel spoel at xray.bmc.uu.se
Thu Feb 21 10:17:06 CET 2013

On 2013-02-20 22:52, Mark Abraham wrote:
> Hi devs,
> It occurred to some of us today that we should pick a C++ coding style
> now before things advance too far. Berk, Teemu and Mark in
> http://redmine.gromacs.org/issues/845 got as far as agreeing that they
> don't care too much about a particular style, except that it should use
> spacing that enhances code readability, and be readily supported in
> common editors (emacs, vi, Eclipse, anything else?). Ideally, without
> needing custom configuration of such editors.
> Is there anyone who already has a good reason for supporting / vetoing
> particular styles?
> Also, any remaining emacs magic lines will disappear at some point soon.
> Mark
This is indeed useful. However it would be immensely helpful to have 
something like emacs magic lines to help maintain a certain style. If 
these are to disappear, HOW will it be enforced? I noted e.g. that a lot 
of Teemu's code has a "non-standard" indentation where
namespace gmx {

does not cause indentation of the underlying code (e.g. class 
definitions). I don't mind this, but if such an indentation pattern can 
not be automated it will be difficult to keep it.

David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se

More information about the gromacs.org_gmx-developers mailing list