Re: Naming Conventions

Adrian Giurca <giurca@tu-cottbus.de> writes:
> I guess one good document is Scott Ambler's
> http://www.ambysoft.com/downloads/javaCodingStandards.pdf

Nice document.  I take it as supporting my proposal.  It doesn't
generally use the word "noun", but all the relevant examples fit.
(Sections 3.11 for properties/fields and section 6.1.2 for classes, also
overview in section 11.1)

> Some other which might be used for guidance are:
> 
> Gosling, J., Joy, B., Steele, G. (1996). The Java Language=20
> Specification. Reading, MA: Addison Wesley Longman Inc.
> Ambler, S.W. (1998a). Building Object Applications That Work: Your=20
> Step-By-Step Handbook for Developing Robust Systems with Object=20
> Technology. New York: Cambridge University Press.
> 
> All of them argue in the favor of a notation as in [2].
> 
> Other possible notations are:
> Hungarian notation (McConnell, S. (1993). Code Complete =96 A Practical=20
> Handbook of Software Construction. Redmond, WA:
> Microsoft Press.)
> 
> 
> - Adrian
> 
> Sandro Hawke wrote:
> > Harold, you made changes to the Naming Conventions page [1] which seeme=
> d
> > to me to combine editorial changes, changes to the conventions, and
> > arguments motivating those changes.  I've refactored the page to try to
> > clean that up.  I hope they all were true to the spirit of your edits.
> >
> > Meanwhile, I hear you arguing that the grammatical considerations are
> > not appropriate in an international context -- that there's no reason
> > class names or property names should be nouns/noun-phrases.  Is that
> > right?  But the Java convention that class names should be nouns or nou=
> n
> > phrases is very well accepted, isn't it?  [1] In fact, google's second
> > hit (after [1]) on "class naming conventions") also supports the use of
> > nouns for property names [2].
> >
> > I think the counter-argument against the conventions I'm proposing is
> > that "ExistentiallyQuantifiedFormula" is too darn long, so "Exists" is
> > fine.  But if that's the case, let's just have a convention that names
> > be short, and justify the shorter names on those grounds, because there
> > was no short noun-phrase name for this class. =20
> > =20
> >      -- Sandro
> >
> > [1] http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
> > [2] http://www.objectmentor.com/resources/articles/naming.htm#Nouns_Ver=
> bs
> >
> >  =20
> 

Received on Tuesday, 18 September 2007 11:02:12 UTC