Multibyte Character Surport for Python

Jacob Hallen jacob at boris.cd.chalmers.se.cd.chalmers.se
Fri May 17 12:59:50 EDT 2002


In article <7a8E8.41035$CN3.1405517 at news2.tin.it>,
Alex Martelli  <aleax at aleax.it> wrote:
>Jacob Hallen wrote:
>> I understand the attraction of using your native language for identifiers
>> and comments, but it is really the dark side of the source.
>
>I don't particularly mind about comments.  By far most comments I've read
>in programs thoughout my life were bogus anyway -- redundant reminders
>of what language rules mandate anyway, or obsolete and thus actually
>misleading rather than helpful.  I wouldn't mind a language-savvy editor's
>option to hide or remove all comments - yes, I'd lose something when the
>comments are actually up to date AND informative about design intentions,
>but all in all I think I'd break even at worst.  OTOH, I think identifiers 
>have a better track record.  Yes, a fraction of them are unhelpful or (more
>rarely) actively misleading -- more often, however, i find them quite
>informative and helpful in understanding what's going on in code.

The fact that most comments you have seen are redundant is because people
have been poorly taught. A redundant comment is harmful, since it
reduces the readability of the code and increases the the risk of
having the comment out of date and thus misleading.

Comments should either briefly explain what a modular unit of the code does
or explain the workings of and reasons for a piece of code that cannot
easily be understood by a person with a reasonable knowledge of the
programming language used.

Identifiers should be the single greatest information bearer in your
source code. If it isn't, either your style is horrible or the programming
language you are using is horrible.

Jacob Hallén

-- 



More information about the Python-list mailing list