Frank Stallone wrote:
On Mon, 07 Apr 2008 15:35:15 -0400, JB wrote:
>In the couple of languages I've been using the most, it has been
standard practice to use some type of Hungarian Notation.
This does not seem to be the case with most of the java I've seen so far
as I've been trying to learn. Is there any "standard" hungarian for
Java - I like using it.
Hope this helps.
http://jdj.sys-con.com/read/36533.htm (see the bottom with the prefix
suggestions)
Also, here is some advice as to why it's not ideal to use:
http://forum.java.sun.com/thread.jsp...sageID=3864893
Java differs from many languages because it has more or less standard
code conventions, created by SUN and used, as far as I know, more or
less by everybody. Look here:
http://java.sun.com/docs/codeconv/
These conventions doesn't use Hungarian notation, and so very few Java
programmers use them.
It is very different from C++, where there are many competing standards,
some of which (Microsoft) use Hungarian notation. I think, in Microsoft
case there was sense in Hungarian notation - because in early Windows
(and in current Windows also) most types were the same (integers or
handlers) - and it was impossible for compiler to distinguish them. So
Hungarian notation helped to ensure type safety.
In Java case type safety is insured by language (most variables have
clearly defined types), and type errors are very quickly shown by
compiler or in run time, so you can free variable names from easily
obtained information.