Case Sensitive, Multiline Comments

John Machin sjmachin at lexicon.net
Thu May 26 18:59:38 EDT 2005


Mike Meyer wrote:

> Personally, I think anyone who has two variables whose names differ
> only in case should be shot. No, let me extend that - anyone who has
> two variables whose names would be pronounced the same should be
> shot. I've had to debug such code, and it ain't fun.

Here's a pair of targets for you:

 From "Software Engineering with Modula-2 and Ada", by Wiener & 
Sincovec, page 84:

WITH w^ DO
     ...
     Col := column;
     Row := row;

It turns out that 'Row' & 'Col' are module-global variables holding the 
current cursor position, and 'row' & 'column' are elements of the record 
to which 'w' points.

Here's another corollary for Meyer's Law: Anyone who has two variables 
the name of one of which is, or could reasonably be understood to be, an 
abbreviation of the name of the other should be shot.

Cheers,
John



More information about the Python-list mailing list