Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6292
| References | <mailman.8469.1306366341.9058.python-list@python.org> <F6DB2229-6123-4C1A-AFAE-1342DEAC841A@comcast.net> |
|---|---|
| Date | 2011-05-26 14:06 +1000 |
| Subject | Re: Python-list Digest, Vol 92, Issue 221 |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2107.1306382819.9059.python-list@python.org> (permalink) |
On Thu, May 26, 2011 at 10:58 AM, Richard Parker <r.richardparker@comcast.net> wrote: > It's time to stop having flame wars about languages and embrace programmers > who care enough about possible future readers of their code to thoroughly > comment it. Comments are far more valuable than the actual language in which > the code is written, IMHO. The problem with comments (and documentation in general) is that they are often imperfect. If the code is absolutely opaque but it has a comment next to it, you still have that niggling doubt: has the comment been updated whenever the code has? Was it even accurate in the first place? (Comments often say what a piece of code _ought_ to do, but the code might have a bug in it. And sometimes, that bug ends up being part of the function's definition, and people depend on it.) I'd rather have both - reasonably readable code AND a comment, where the comment explains the intent behind the code. // allow space for frobnostication height += BTN_HEIGHT; Chris Angelico
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Python-list Digest, Vol 92, Issue 221 Chris Angelico <rosuav@gmail.com> - 2011-05-26 14:06 +1000
Re: Python-list Digest, Vol 92, Issue 221 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-26 10:07 +0000
Re: Python-list Digest, Vol 92, Issue 221 Chris Angelico <rosuav@gmail.com> - 2011-05-26 20:25 +1000
csiph-web