[opencms-dev] Naming conventions
Dan Liliedahl
dliliedahl at efoundry.com
Sun Sep 6 15:12:28 CEST 2009
Hungarian Notation, invented by Charles Simonyi. Originally used for C/C++,
adopted for use in Java:
http://c2.com/cgi/wiki?HungarianNotation
On Sun, Sep 6, 2009 at 9:04 AM, Manfred Schenk
<manfred.schenk at zerobyte.de>wrote:
> Paul-Inge Flakstad schrieb:
> > Hi
> >
> > Just a silly question really: I've never seen the naming convention used
> in OpenCms, with the "m_" prefix on member variables, used in Java before.
> Is this a commonly used naming convention in Java? Should I follow it when
> writing code which may be contributed to OpenCms? If so, is this the
> convention below the correct one?
> >
> > 1. member variables are prefixed with m_
> > 2. static variables are prefixed with s_
> > 3. global variables are prefixed with g_
>
> It is not commonly used in Java I think - but I've seen it in several
> cases where teams had switched from another language to java and had
> kept their naming guidelines.
>
> From my point of view such a type indication inside a name is not needed
> anymore since there are powerful IDEs nowadays.
>
> But if one special convention is used then it should be used
> consistently for the whole project.
>
> Regards,
> Manfred
>
> --
> | Manfred Schenk | born between RFC638 and RFC640
> | PGP-Keys unter |
> | http://www.ZEROByte.de/pgp/ | WWW: http://www.ZEROByte.de/
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090906/0ce3313c/attachment.htm>
More information about the opencms-dev
mailing list