Re: Newb Naming Convention Question
- From: Mishagam <noemail@xxxxxxxxxxxx>
- Date: Fri, 11 Apr 2008 23:15:33 -0400
Frank Stallone wrote:
On Mon, 07 Apr 2008 15:35:15 -0400, JB wrote: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:
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.jspa?threadID=657725&messageID=3864893
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.
.
- References:
- Newb Naming Convention Question
- From: JB
- Re: Newb Naming Convention Question
- From: Frank Stallone
- Newb Naming Convention Question
- Prev by Date: What's missing from Java
- Next by Date: Re: What's missing from Java - noy rick rolling
- Previous by thread: Re: Newb Naming Convention Question
- Next by thread: Divide an image in 4 blocks
- Index(es):
Relevant Pages
|
|