Arguments against Hungarian Notation

Kimbro Staken plug-devel@lists.PLUG.phoenix.az.us
Fri May 3 23:15:02 2002


Hungarian came out of Microsoft from the C and C++ world, I suspect VB 
people just picked it up out of imitation without really understanding 
what it was for.

The best argument you'll have is that it isn't part of the Sun coding 
conventions for Java. [1] It is also pretty useless in a pure OO language 
where you don't have pointers, it really just obfuscates the code. 
Basically if almost everything is an object then every variable ends up 
with an o or something similar on the front. It won't even help for stuff 
that isn't an object as the compiler can easily keep track of the types. 
Plus virtually no java programmers use it because of the Sun conventions.

Also if you want a Microsoft oriented argument, tell them that not even 
Microsoft uses it anymore with C# as part of .Net.

Next up you'll have to battle them over wanting to stick an I on the front 
of every interface name. That's just obfuscation too.

[1] http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

On Friday, May 3, 2002, at 07:30 AM, Carl Parrish wrote:

> Okay I *long* ago decided to give up on Hungarian Notation. (I think
> only VB programmers seems to like it). I now find myself in a shop with
> a *lot* of previous VB programmers who are converting to Java. So I want
> them to stop using hungarian notation. So far the only argument against
> it I could remeber is that it violates OO abstraction. But I *know*
> there are better arguments against than that. Anyone have any sources or
> know of any good reasons against?
>
> Carl Parrish
>
>
> _______________________________________________
> PLUG-devel mailing list  -  PLUG-devel@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>
>
Kimbro Staken
Java and XML Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org