Hungarian notation (was RE: variable naming...)

Erik Max Francis max at alcyone.com
Tue May 1 11:32:13 EDT 2001


John Schmitt wrote:

> Now, if you write a program that uses the above-mentioned struct in a
> bunch
> of places, what will you do when it's time to refactor?  Supposing
> that
> someone decides that we in fact need floats rather than ints to
> represent
> points?  Search and replace?  Hand editing?  That's a good waste of my
> time.

Worse yet, the approach that's (too) frequently taken is to leave the
inconsistency.  This, as well as misleading or inaccurate notations
introduced by programs for the reasons you mention above -- because
there's no universally agreed-upon method of notation and even if there
was, engineers don't always remember it off the top of their heads --
means that often enough the notations on the identifiers you're looking
at in a block of foreign code are misleading or _wrong_.  You're better
off actually looking up the definitions of those variables, rather than
betting on the Hungarian notation you see being accurate and useful --
which is what you really should be doing anyway.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Guided by the blue light that takes you away / I'm on my way home
\__/ Neneh Cherry
    Maths reference / http://www.alcyone.com/max/reference/maths/
 A mathematics reference.



More information about the Python-list mailing list