[PATCH build 3/3] Use consistent parameter expansion notation.

Trevor Woerner twoerner at gmail.com
Thu Sep 16 06:29:19 PDT 2010


On Thu, Sep 16, 2010 at 9:04 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> Clearly this is just bikeshedding, but I think this practice sucks.
> There are very clear times when the braces are useful or needed to
> delimit variables or do parameter expansion. Every other usage is just
> adding extra characters and typing.

Thanks for your thoughts.

I agree, partially, with the bikeshed comment; the thought had
occurred to me a couple patches ago :-). However, let's say the
build.sh script didn't exist before yesterday and I had submitted it
for consideration for the first time in my last patch. Looking through
the file it would be obvious it had been written by one person, and,
agree with the formatting or not, at least there would be a
consistency to it.

Looking through the script as it existed a couple days ago you can
tell its age. Multiple different personalities have chewed at it
leaving it... scruffy-looking. Some people say "this formatting is
easier to read" and others say "that formatting is easier to read". In
my experience any formatting is easy to read but what I find jarring
is the switching within the same file between multiple styles. To me
it's like reading text where the author changes typefaces with every
paragraph or sentence. So I agree that it would be nice if it looked
more homogeneous.

Let me point out, however, that I didn't spearhead the initiative to
make the formatting consistent. It is my experience that patches
should be as small as possible to achieve the stated goal and nothing
else.

> This diff is a perfect example of
> it: 114 lines changed for zero functional difference.

I agree! In my experience a patch like this in the "corporate" world
would be completely rejected. It's a mortal sin to make non-functional
changes to existing, tested, released code :-). Besides, who would
want to pay a developer to format code? :-) I'm not some long-time
open source developer, but it seems to me the culture on this side of
the fence is a bit different.

I don't have commit access (and am perfectly happy that way) so I'm
relieved of the responsibility of having to make any decision one way
or the other. People made suggestions, I had some free time, so I
generated some patches :-D If nothing else I'm learning a lot of "git"
along the way! :-D

Best regards,
    Trevor


More information about the xorg-devel mailing list