[petsc-dev] Style Guide: How to format single-line if/for/while-blocks?

Barry Smith bsmith at mcs.anl.gov
Mon Jan 21 22:08:23 CST 2013


On Jan 21, 2013, at 10:02 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Mon, Jan 21, 2013 at 9:49 PM, Mark F. Adams <mark.adams at columbia.edu> wrote:
> And some folks don't like "egyptian" braces and want { on its own line, and why not if } needs its own line why not  { ?
> 
> Because it eats up more precious vertical space. ;-)
> 
> The way I see it, if you can get uncrustify to format it your way and to put it back into canonical form, then you're welcome to edit however you like. Note that if you change line numbers, you won't be able to translate as easily from emails and bitbucket diffs (they will have "clean" repository formatting).
> 
> If anyone wants to do this with git, I can show you how. I think you'll find it's not as nice to work with as you may have hoped, not through a failing of the tool, but because we also communicate through side channels.

Well I think it is insane in 2012 that we all need to stare at the exact same ASCII strings with the exact same placement (each of you thinks is wrong) when we develop shared code, so please teach me how. Can this be done through some bridge that uses the current hg PETSc repository? 

   Unfortunately the CPP crap in PETSc messes things up a bit, curse that CPP wish we could eliminate it all. And yes CPP is C preprocessor not C++.

   Barry





More information about the petsc-dev mailing list