lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GOP2-4 - C++ and scheme indentation


From: Keith OHara
Subject: Re: GOP2-4 - C++ and scheme indentation
Date: Fri, 10 Aug 2012 08:26:47 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Graham Percival <graham <at> percival-music.ca> writes:

> On Thu, Aug 09, 2012 at 12:21:06PM +0200, Jan Nieuwenhuizen wrote:
>
> > Do we explain that we're a GNU project and as
> > such use GNU coding style?  Together with a pointer to the info
> > node *(standards)Formatting, that could help.
> 
> Given that I don't think that we follow GNU style exactly, I don't
> think that's relevant.
 
I think we *do* follow GNU style exactly in the C++ code.

Remember that the formatting guidelines in the GNU standard referenced
above are quite brief, and says: 
  We don’t think of these recommendations as requirements, because it 
  causes no problems for users if two different programs have different
  formatting styles. 
  But whatever style you use, please use it consistently, 

> > What could help, though, is to just accept small patches that have
> > formatting problems, run C-x h C-M-\ , tell them thank you and show
> > them the reformatted diff from C-x v = ?

But beware that this uses mixed tabs and spaces, unless you have
configured emacs to use spaces only, as most people prefer today,
... and that it left-justifies block comments, some of which are
not meant to be left-justified, ... and that you need extra 
parentheses to properly indent complex expressions.

> I really don't see the objection.  Scheme is pretty easy to
> indent.  We almost have a working scheme file which indents
> scheme.  This will completely eliminate one of the known stumbling
> blocks facing new contributors.  What's not to love?
 
There is nothing not to love.   Scheme indenting is merely less
pressing to automate than was C.  Fewer people program Scheme, and
they already have an editor that does the indenting. The GNU standards
give no advice on formatting Scheme, so the remaining questions on the 
formatting have no ready answer.

Adopting the tool under review will be good for running once over 
the source to get tabs-to-spaces properly and do some cleanup, but 
then people will indent as they edit.  In contrast, I always need 
to run fixcc.py to apply the insane GNU spacing rules
  if (b.x ().is_empty ())




reply via email to

[Prev in Thread] Current Thread [Next in Thread]