A linguistic convention requiring one or more letters to be added to the start of variable names to denote scope and/or type.
Hungarian Notation is mainly confined to Microsoft Windows programming environments, such as Microsoft C, C++ and Visual Basic. It was originally devised by Charles Simonyi, a Hungarian, who was a senior programmer at Microsoft for many years. He disliked the way that names in C programs gave no clue as to the type, leading to frequent programmer errors.
According to legend, fellow programmers at Microsoft, on seeing the convoluted, vowel-less variable names produced by his scheme, said, “This might as well be in Greek – or even Hungarian!”. They made up the name “Hungarian notation” (possibly with “reverse Polish notation” in mind).
Hungarian Notation is not really necessary when using a modern strongly-typed language as the compiler warns the programmer if a variable of one type is used as if it were another type. It is less useful in object-oriented programming languages such as C++, where many variables are going to be instances of classes and so begin with “obj”.
In addition, variable names are essentially only comments, and thus are just as susceptible to becoming out-of-date and incorrect as any other comment. For example, if a signed short int becomes an unsigned long int, the variable name, and every use of it, should be changed to reflect its new type.
A variable’s name should describe the values it holds. Type and scope are aspects of this, but Hungarian Notation overemphasises their importance by allocating so much of the start of the name to them. Furthermore, type and scope information can be found from the variable’s declaration. Ironically, this is particularly easy in the development environments in which Hungarian Notation is typically used.
Simonyi’s original monograph (http://msdn.microsoft.com/library/techart/hunganotat.htm).
Microsoft VB Naming Conventions (http://support.microsoft.com/support/kb/articles/Q110/2/64.asp).
noun 1. . [vizh-lo] /ˈvɪʒ lɒ/ noun, (sometimes initial capital letter) 1. one of a Hungarian breed of medium-sized, powerful hunting dogs having a short, smooth, rusty-gold coat, a square muzzle, and a docked tail. /ˈvɪʒlə/ noun 1. a breed of Hungarian hunting dog with a smooth rusty-gold coat
[huhng-guh-ree] /ˈhʌŋ gə ri/ noun 1. a republic in central Europe. 35,926 sq. mi. (93,050 sq. km). Capital: Budapest. /ˈhʌŋɡərɪ/ noun 1. a republic in central Europe: Magyars first unified under Saint Stephen, the first Hungarian king (1001–38); taken by the Hapsburgs from the Turks at the end of the 17th century; gained autonomy with […]
[huhng-ger] /ˈhʌŋ gər/ noun 1. a compelling need or desire for food. 2. the painful sensation or state of weakness caused by the need of food: to collapse from hunger. 3. a shortage of food; famine. 4. a strong or compelling desire or craving: hunger for power. verb (used without object) 5. to feel hunger; […]
- Hunger contractions
hunger contractions pl.n. Strong contractions of the stomach associated with hunger pains.