[Top][All Lists]

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

Re: Code formatter

From: Graham Percival
Subject: Re: Code formatter
Date: Fri, 13 Nov 2009 19:26:22 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Nov 13, 2009 at 01:17:43PM -0500, Chris Snyder wrote:
> You're approaching this as if it's a technical issue. As of now, it's  
> not. I don't have the standing in the community to resolve the social  
> issues that must be dealt with first.

... you didn't learn anything from the long email I wrote?

As I said before, it's a mixture of technical and diplomatic.  But
before you can get diplomatic, you need to find a tool that
produces what you consider to be good code.  I want you to say "I
believe that astyle 1.22 with these command-line options produces
good code".

Then I'll look at the output.  If I find something that I
question, then I'll ask if you really think that's good.  For
example, changing
   int foo
     = 3;
   int foo
   = 3;
is IMO questionable.

If you reply "gee, I didn't notice that", then it's bad.  I lose
faith in your judgement.  If you say "oh come on, who cares?  it's
close enough, right?" then I lose even more faith.

However, if -- at the beginning -- you say "I think that astyle
1.22 with these options produces good code, apart from this one
instance in the lilypond source code, which looks like this..."
then I respect you.  You've looked into the matter.  You've warned
me of a potential downside to your tool.

Now, if you can say "I looked at tools x, y, and z.  Y with
options a,b,c comes the closest to our existing code.
Unfortunately, Y has questionable output for these two bits of
source code.  On the other hand, if we rewrote one of those lines
of code, tool Y would produce good output.  In addition, tool Y is
eaiser to use than emacs, is only 500 kb instead of the 30 Mb that
emacs takes.  I therefore propose that we use tool Y to format the
C++ lilypond source code"...

If you say the above, then I'm impressed.  You've investigated
other tools.  You're aware of the downsides of your chosen tool.
You've warned us ahead of time, so we're not unpleasantly

We then spend a few days discussing it, and (probably) decide to
adopt it.  A few people disagree, but the argument in favor of it
is clear and honest.

- Graham

reply via email to

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