The worth of comments

Tim Roberts timr at probo.com
Fri May 27 03:02:23 EDT 2011


Roy Smith <roy at panix.com> wrote:
>
>Over the years, my use of comments has evolved.  I was taught, "You 
>should comment your code".  Eventually, I came to realize that the real 
>mandate is, "You should make it easy to understand your code".  Comments 
>are just one possible tool to help achieve that goal.

Absolutely correct.  In my view, this is one of the strongest attributes of
Python -- its syntax is such that much of the code can be read out loud
like prose.  That's a HUGE benefit.  Code is read a lot more often than it
is written.

Ruby has a lot of followers, and I am trying to get excited about it, but
it has succumbed to the same special-characters-as-syntax disease that
killed Perl.  Much Ruby code is just unreadable.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list