Coding standard: Prefixing variables to indicate datatype

Lothar Scholz llothar at web.de
Thu Jan 16 18:23:37 EST 2003


> 
> This general class of notation is called Hungarian notation.  It's
> either strongly liked or disliked; there's rarely opinions that lie in
> between.  (I'm of the opinion that it is almost always overkill, tends
> to become inaccurate over time due to code shift, and 99% of its
> benefits can be gained simply by choosing appropriate identifiers.  Not
> to mention terrribly ugly.)

I can't find at least one good reason for this notation. Its a well
known
jokes that Hungarian notation was the reason that Win95 was delayed 2
years
because the programmer had to change every line of code :-)

In fact now you have this fucking WIN32 API where you can find lots of
places where the variable is different then the prefix. Event
datatypes change during program lifetime - ignoring this means simply
being a manager that has never written a really large software system.

If your variables are so short that you can't imagine the name you are
doing something wrong. I program in eiffel the whole day and we have
method names
like  "create_keyboard_shortcut_from_string". You read a program
multiple times
but you type it much less.




More information about the Python-list mailing list