[MPlayer-dev-eng] [PATCH] libbs2b: new api

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Apr 22 18:37:03 CEST 2009


On Wed, 2009-04-22 at 19:10 +0400, Andrew Savchenko wrote:
> On Tuesday 21 April 2009, Uoti Urpala wrote:
> [...]
> > > > +            else
> > > > +            if (!strcmp(s->profile,"cmoy"))
> > > >
> > > > "else if" should be on one line.
> > >
> > > No, no, no. The idea is to keep all if statements at the same
> > > alignment level, otherwise it will be mess to read. Currently
> > > they have nice and easy-to-understand-the-code indentation.
> > > Statements are logically equal and there is no reason to
> > > accent one of them. You may consider this as swith statement
> > > for strings.
> > >
> > > Yes, I know this is not strict K&R indentation but sometimes
> > > logics should override common rules.
> >
> > "switch statement with if" is a common case, not in any way an
> > exception. Your version is not objectively better. You can make
> > up arguments at least as good as your "logically equal" against
> > it if you want. I find it uglier in practice too.
> 
> All indentation beauty or ugliness is highly subjective by 
> definition. This is normal because different people have different 
> tastes.

That was pretty much the point I tried to get across in my mail. You
can't expect others to accept your nonstandard formatting: it is in no
way objectively better, but it's harder to read something you're not
used to.

Do you think that I tried to pick my favorite formatting for every case,
and the result just happened to match K&R style? Of course not. Rather,
I concluded that I could not objectively justify doing formatting
differently, while using as standard a style as possible maximizes the
changes of matching the style used by others, and that does give some
objective benefit.

> Paragraph 6 of tech/svn-howto.txt states:

Yes that file is inaccurate in several ways.




More information about the MPlayer-dev-eng mailing list