Hungarian Notation

Why Trust Techopedia

What Does Hungarian Notation Mean?

Hungarian notation is a convention for naming and differentiating between data objects. When Hungarian notation is used, a programmer adds an indicator prefix to each object name to easily and readily identify its type.

Advertisements

Additional prefixes also may be used to identify the function, thread or other object feature. This is very important when a program expands into multiple modules and threads, as remembering every object’s purpose is difficult if a naming convention is not used.

Techopedia Explains Hungarian Notation

Most programmers add prefixes to a meaningful variable name of choice. For example, a programmer creating a Boolean variable whose function is to store a result indicating a summation operation’s success or failure might name this variable BoolSum. If many threads conduct similar functions, he may use the terms BoolSumThread1 and BoolSumThread2 as meaningful names that differentiate the variables.

Meaningful naming conventions become more important when a project is a collaborative effort by many developers. A combination of appropriate naming conventions and simple program comments are among the best practice recommendations in such cases.

Dr. Charles Simonyi, a Hungarian-American computer software executive, is credited with creating the Hungarian notation. However, when Dr. Simonyi’s colleagues read the variables he named according to his new convention, they discovered the names were not in English.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.