[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "dselect" replacement team



Jason Gunthorpe:
> Now, in my definition clear code requires a very high comment density,
> alot of descriptive text and so on, [...]

I don't want to get into a religious flamewar about the virtue or
otherwise of comments.

I would like to point out that the position that all good code is
heavily commented is not universally accepted in the programming
establishment (if there is such a thing).  Even C++'s creator
Stroustrup[1] is not entirely enamoured of them (see his comments near
the beginning of The C++ Programming Language).

The lack of comments in my code reflects my own personal experience,
that other people's comments don't help my understanding of the code
(I read the code itself), and my expectation that only good
programmers ought to be modifying my code at all.

If I were writing for a company full of monkey-see monkey-do
programmers I might well take a different view, but we have to realise
that free software gets much of its virtue from being written by a few
good programmers rather than many mediocre ones.

IMO anyone who finds my code unreadable without further comments
should not be hacking it.

Ian.

[1] Not that he's God or anything; it's just that I thought that since
Jason seemed heavily into C++ he might have some respect for
Stroustrup.


Reply to: