On Mon, 16 Jun 2003 01:47:07 +0900, Yura wrote:

> You all know this already, but ...
> 
>> -----Original Message-----
>> From: Daniel Carrera [mailto:dcarrera / math.umd.edu] Sent: June 15, 2003
>> 12:11
>>
>> I just looked up "hungarian notation" in microsoft.com.  I cam accross a
>> tutorial about it.  Here is a quote from it:
>>
>>   This system became widely used inside Microsoft. It came to be known
>>   as "Hungarian notation" because the prefixes make the variable
>> names look a
>>   bit as though they're written in some non-English language
> 
> http://ootips.org/hungarian-notation.html "Hungarian Notation - The Good,
> The Bad and The Ugly" ..
> Hungarian Notation (HN) is a naming convention invented by Charles Simonyi
> from Microsoft. (He is Hungarian)
> 
>> That's about the only thing I agree with in that document.  My personal
>> opinion is that hungarian notation produces the most unreadable code
>> imaginable.  Sure, it produces tiny variable names, but since characters
>> are cheap, and human mental strain expensive, I think that one should
>> minimize the mapping necessary between the human's brain and the code.
> 
> I hate HN and never use it, but it has "nothing" to do with variable names
> per se.  Whatever name you decide to use for the variable you just append
> one letter in front of it denoting the variable type -- you can use
> hMyWindowHandle instead of hWnd.
> 
> Yura.

My memory (and my memory goes back a long way :-) is that Hungarian
notation was invented back when C compilers didn't do a great job of
diagnosing type mis-matches and there were no such things as function
prototypes. In addition to embedding the type of the variable in the
name, it gives the programmer a way to do "type algebra," i.e.
it helps you to remember that dereferencing a pFoo yields a Foo.

The reason it's called "Hungarian" notation is that it was invented by
Charles Symonyi, long-time Microsoft senior programmer, who was born in
Budapest.

I once invented a coding standard called Pottsylvanian Notation. All the
variables had to be named as if Boris and Natasha were coding, so you have
variables like "moose" and "squirrel".