[MPlayer-dev-eng] Indentation style (was: [PATCH] Fix useless dependencies in the stream lib)

Uoti Urpala uoti.urpala at pp1.inet.fi
Tue Apr 8 22:11:02 CEST 2008


On Tue, 2008-04-08 at 21:31 +0200, Alban Bedel wrote:
> We don't really need everybody to agree. If some maintainer hate tags
> for some reason he is free to forbid them in the files he maintain.
> For files without maintainer obviously we will need some consensus, but
> I doubt that debating adding a few comments would be as inflammatory as
> breaking a long established tradition.

I think letting "the maintainer" decide on use of non-standard tags is a
major problem with your proposal. The maintainer list often does not
reflect who in practice works on the files; and IMO we do not want the
bureaucracy to maintain a really authoritative list. In practice there
is rarely only a single person who would work on a file. We'd need a
better way to decide how to set the tags if there is any disagreement.
And overall I think trying to set authority over code on a per-file
basis is a bad idea.

If some file which uses non-standard formatting (especially other than 4
space indent) gets many edits with 4-space indent then is setting tags
really the right answer? IMO it's questionable whether it would be
reasonable to set nonstandard tags, as obviously more people than the
original author need to work on it. Maybe reindenting it to follow a
common style would be a better choice.

One example of a file which IMO should not require using nonstandard
style for edits is m_option.c. You originally wrote that file, but
working on options related to other code can easily require changes to
it, and it should not be considered anyone's "own" file.

> > > The only downside I can see is that it would give lees reasons to
> > > have a common style ;)
> > 
> > That's a good reason, why reduce the pain threshold? ;-)
> 
> IMHO if we start tagging some files, it would probably give some more
> insensitive to clean files with mixed indentation. Which after all
> might be a good occasion to try getting them to use your common style ;)

That there are files with mixed style shows that in practice many files
will be worked on by several people, at the same time or at different
times. Allowing the first person to work on the file to set nonstandard
tags and making such a style even more "official" for the file would
have a negative effect. Changing style every few lines is a readability
problem, but for example having some functions in a different style is
much less so IMO. So I think that at least adding a new function in a
common style should be OK even if the rest of the file uses some weird
style - adding more code in a weird style even if the only person who
likes that style isn't currently working on the code is a problem too.




More information about the MPlayer-dev-eng mailing list