Lists Home |
Date Index |
- From: Peter Murray-Rust <email@example.com>
- To: xml-dev Mailing List <firstname.lastname@example.org>
- 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
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)