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
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…