How are we doing?

Jeremy White jwhite at winehq.org
Fri Jun 2 08:03:46 CDT 2006


> If what you really want is code that's easier to understand we're better
>   off scrapping all comments, then enforcing good coding style, so that
> the code is readable without comments.  If the functions are kept small,
> things are well named, and the complexity confined (eg. no 7 level
> indent), you'll be able to understand the code without the auth
> 
> If you need to comment your code so others can understand it, it's
> probably badly structured and unclear.


I think that above argument, and the gripe about:
  i++;  /* increment i */
are both overrated and overused to get away with
laziness and to excuse a lack of discipline that would
create better code.

Yes, obviously written code to perform an obvious function
needs few, if any, comments.  And I think I would agree that
the Wine server is commented about right; it is,
imho, a beautiful piece of code.

But there are plenty of places in Wine where the code does
something screwball or out of the ordinary (hell, the API
itself is screwball), and those places deserve more comments.

I think David hit the nail on the head.  I don't need a
comment to tell me what the code is doing, I agree that
the code itself is more clear.  I need a comment to tell me
why the @#$ you decided to do that.

And the problem is that that prevailing attitude discourages
people from being thoughtful about where a comment
*would* do some good.

I'd far rather discard a bunch of /* increment i */
comments but still have some comments as to an authors
state of mind than have no comments at all (what we have now).

But that's too bad, because Alexandre feels exactly
the opposite; and so long as he's in charge (and I very
much want him to continue being in charge), that's the
way it's gonna be.

@#$!@$@#$ Wine Maintainer...

<grin>

Cheers,

Jeremy



More information about the wine-devel mailing list