[GRASS-dev] Re: GRASS 7 development started
Ivan Shmakov
ivan at theory.asu.ru
Tue Apr 29 00:56:17 EDT 2008
>>>>> Glynn Clements <glynn at gclements.plus.com> writes:
[...]
> My personal preference is:
> indent -bad -bap -bbb -bl -bli0 -bls -cli0 -cs -fc1 -hnl -i4 -l79 \
> -nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs \
> -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut
> Descriptions of the above options are given below, although it may be
> more clear to just apply the above command to a bunch of files and
> look at them.
> Others will presumably have different preferences; in which case
> please express them sooner rather than later.
[...]
> -bl, --braces-after-if-line Put braces on line after if, etc.
While I don't care much about the other options, I dislike this
particular choice as error-prone. It's much easier to move or
copy the { } block without the `if' statement (and get a still
syntactically-valid code) in this case:
if (...)
{
...
}
than it's in this:
if (...) {
...
}
The same applies to:
do
{
...
}
while (...);
vs.:
do {
...
} while (...);
And, to a lesser extent, to `struct', `union' and `enum'
definitions.
(This, however, doesn't apply to the function bodies.)
[...]
More information about the grass-dev
mailing list