[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] comment formatting - unneeded slashs and asterisksconsidered
From: |
Owen Taylor |
Subject: |
Re: [Devel] comment formatting - unneeded slashs and asterisksconsidered harmful |
Date: |
Thu, 1 Aug 2002 10:20:23 -0400 (EDT) |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/21.1 |
"Graham Asher" <address@hidden> writes:
> Okay, but my real idea is *not* to impose my own format, but to suggest ways
> in which formatting rules can be relaxed slightly. It is possible to allow
> both boxed and unboxed comments. Also, is it *really* necessary to have a
> rule about whether you write
>
> if (x)
>
> or
>
> if(x)
>
> or
>
> if ( x )
>
> ?
>
> I think not. It doesn't make any difference to readability, and you can
> happily allow all styles. By all means have a compulsory indenting scheme,
> but please don't go much further than that.
>From my personal opinion, there is great value in having consistency
even in "details" like this. What consistency does is allows you
to pick out the significant features of the code while ignoring
noise. If there is a section of code that looks like:
if ( foo )
{
a = 1+2;
}
else if(foo)
{
b = 2 + 3;
}
else
{
c=4 + 5;
}
Then suddenly there is all sorts of visual structure that is
irrelevant to the code at hand. Similarly, if you are comparing
two similar sections of code and they differ in formatting,
it makes it harder to see the significant differences.
I'm not particularly fond of many of the particular formatting
conventions used in FreeType, but I'd much rather there be some
set of conventions than have it be mixed according to the whims
of the coder.
Regards,
Owen
- [Devel] comment formatting - unneeded slashs and asterisks considered harmful, Graham Asher, 2002/08/01
- Re: [Devel] comment formatting - unneeded slashs and asterisks considered harmful, Werner LEMBERG, 2002/08/01
- Re: [Devel] comment formatting - unneeded slashs and asterisksconsidered harmful, Werner LEMBERG, 2002/08/02
- RE: [Devel] comment formatting - unneeded slashs andasterisksconsidered harmful, Graham Asher, 2002/08/03
- Re: [Devel] comment formatting - unneeded slashs andasterisksconsidered harmful, Werner LEMBERG, 2002/08/03
- RE: [Devel] comment formatting - unneeded slashes and asterisks considered harmful, Graham Asher, 2002/08/04
- Re: [Devel] comment formatting - unneeded slashs andasterisksconsidered harmful, Sven Neumann, 2002/08/04