[Xastir-dev] Proposal to change project coding standards: Please vote!

Paul J. Morris mole at morris.net
Wed May 1 11:24:47 PDT 2019


My thoughts:

1) Two space indent.
  This aids in readability in the deeply nested code that we have.  
  Definitely spaces, it is very easy to get confusion when a mixture of
tabs and spaces are in play when different editing environments aren't
configured to treat tabs as the expected number of spaces. 

2) I prefer the current non-aligned start and end braces for blocks.
  The line with just an open brace on it { doesn't add anything to
readability that the indentation doesn't already show, and it reduces
the number of lines of code that are visible at once.     

3) Optional braces, yes definitely always include.
  I find omitting explicit markers of the start and end of blocks a very
easy way to introduce errors when editing code, it is far to easy to
not notice that the one indented line is the block and add in another
indented line without realizing that it isn't in the same block.   

Other stuff can be valuable if it is provided in the form of machine
readable configuration that can be used by an IDE to format code
according to an expected style guide.

-Paul

On Wed, 1 May 2019 08:32:51 -0700
Curt Mills <curt.we7u at gmail.com> wrote:
>
> We could specify a whole bunch of other stuff but the rest isn't all
> that important.
>  


-- 
Paul J. Morris
Biodiversity Informatics Manager
Museum of Comparative Zoölogy, Harvard University
mole at morris.net  AA3SD  PGP public key available


More information about the Xastir-dev mailing list