aspose file tools*
The moose likes Cattle Drive and the fly likes What is Hungarian notation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "What is Hungarian notation?" Watch "What is Hungarian notation?" New topic
Author

What is Hungarian notation?

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4339
    
    2

On the style page it says not to use Hungarian notation. Could someone explain to me what Hungarian notation is?


SCJP
Visit my download page
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
Hungarian notation started with something that told you the type of the object, i.e. iMyInt was an int.

The roots of this naming standard are in early Object-Oriented languages, where it was an important requirement to distinguish between classes and objects. In Smalltalk, for example it is/was traditional to name a class (for example) "Thing", and an instance of it "aThing". When they came to decide on what to do with method (message) names, they chose to lump them with objects, considering them as concrete things rather than abstract things like classes.

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
I thought the Hungarian notation was something concocted by someone working for Microsoft, so they published this long coding standard paper for using the notation. Later they found out that it was a stupid idea, and they stop using it at Microsoft. Of course like Microsoft, they decided not to admit to their mistake and tell the rest of the world.
Forgive me for forwarding you to this site, but this was the only link I could find any useful information.
-Peter
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Randall,
Read this post to see a better (i.e. unbias ) explanation given by Frank Carver.
-Peter
[ July 18, 2002: Message edited by: Marilyn de Queiroz ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is Hungarian notation?
 
Similar Threads
Hungarian Notation
Hungarian Notation is a no no
Change 2 if conditions into 1 if condition ?
Style Guide
OO abstraction