OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SAX: Method Name Collisions

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev Mailing List <xml-dev@ic.ac.uk>
  • Date: Thu, 16 Apr 1998 08:27:53

At 10:12 13/04/98 -0400, David Megginson wrote:
>The first, "getAttributeListLength", is the ugliest.  It is simple to
>avoid this problem by creating a separate class for SAXAttributeList,
>rather than implementing it in the main driver -- what does everyone
>else think about this question?
I've been away for some days, so ignore this if you've come to a conclusion...

I have been gently struggling with the naming problem whilst developing
JUMBO2 which is now based on the SwingSet classes. I though about names
like jumbo.xml.Tree and so on, but rejected them in favour of a small
uniquifying prefix (XTree, etc.). This is rather similar to the swing use
of JTree. The likelihood of collision between Tree, Node, Element,
Attribute, and a few others is very high and the result is that there may
have to be lines of the form:
	jumbo.xml.Tree tree = new com.sun.java.swing.JTree(new
which is the appropriate way to uniquify them. The short names are
difficult to search for - searching for Tree in all files will return a
large number of unwanted hits.  Therefore I'm mildly in favour of SAXFoo.

I'm not passionate on this, but I also support Stroustrup's philosophy that
well devised names are often better than comments.  So
getAttributeListLength() may possibly avoid the use of a comment.

Also, where possible, anything that has the same 'feel' as the Java class
libraries is a help to learning.

As we all know this is a subjective matter and I'll trust David to make a
good job of it.

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS