Direction of KDevelop4

Vladimir Prus ghost at cs.msu.su
Mon Sep 12 16:49:06 UTC 2005


On Monday 12 September 2005 18:34, Adam Treat wrote:

> > I disagree.  As I said, often the code is clear, but the motivation of
> > the code is not. Say, this code in gdb reply processing:
> >
> >     QCString r(buf);
> >     r.replace( QRegExp("\\\\000|\\\\0"), "" );
> >
> > is absolutely clear, but why it's there. The answer (producing reasonable
> > result for QString), is not at all obvious, and requires comment. There's
> > no problem with the code, but comment is needed. I see many such cases.
>
> Yah, well, commenting it with "produce reasonable result for QString" is
> just the type of useless comment I'm talking about.  It explains nothing
> and just takes up space ;)

Exactly. But note that "produce reasonable result for QString" is comment you
just made up yourself and not the comment I would have ever used. Especially 
that words "reasonable", as well as "appropriate" are exactly the signs of 
obscure comments.

> Damn, I don't ever want to bugfix after you ;)  Seriously, those files have
> inconsistent styles from method to method, and in some cases, in the very
> same method.  We have:
>
> if(something) {
> }
>
> for ( blah )
> {
> }
>
> while ( foo ) {
> }
>
> etc, etc.
>
> But, now I know if I'm ever bugfixing your code I'll just write:
>
> if(something){blah blah blah;}for ( blah ){ blah blah blah; }while ( foo )
> {blah }

You take it way to far. I did not say indentation is useless. All I did say
is that the above three indent styles are all the same. And there are much 
serious problems than moving braces around.

> > Your own, I guess. Again, there should be specific base indent offset, so
> > that you clearly know which nesting level you're at, but everything else
> > is a personal choice.
> >
> > > Second, because
> > > this makes my eyes bleed.
> >
> > Well, that's very subjective.
>
> Thanks.  So, since it is my personal choice and so subjective and all, I'll
> be sure to modify your files with code obfuscated so bad that you'll be
> begging for some perl. Of course, I'll make sure to comment the hell out of
> it to keep you happy.
....
> Well, given the above, I can see why you doubt source can be self
> explanatory.

Is it really necessary to first put words in my mouth, and then make any 
conclusions from that?

- Volodya




More information about the KDevelop-devel mailing list