xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smiley <dsmi...@mitre.org>
Subject Re: No Collections API use?
Date Fri, 13 Aug 2004 14:07:10 GMT
On Aug 13, 2004, at 12:46 AM, David Waite wrote:
> Actually, the speed trade-off was mine. This is due to arrays being a 
> 'quasi-native' type in java, vs. collections which are just objects 
> with references to one another forming a data structure.
> Really though, Collections are used for manipulation, correlation, and 
> indexing of data; arrays do not handle any of these well.

I hope I don't come across as condescending when I say this but, I 
think you're missing the point of the Collections API.  It 
*standardizes* the access and manipulation of objects into a *separate* 
object from whatever object it is that contains the things.  The 
"standardize" point is obvious, but the "separate" point is especially 
relevant to XMLBeans because presently there are eight methods per 
group of sub element type.  These eight methods could be replaced by 
just one that returns a java.util.List.  The end result is less API and 
increased use of a standard API the Java programmer already knows 

>  On the other hand, collections in java (< 1.5) have a major flaw, in 
> that they leave the contained data completely untyped.

I agree with your point that Collections being untypes prior to 1.5 is 
a problem, but I don't think it's "major".  We Java developers deal 
with collections all the time, and they are plenty useful nonetheless.  
If it was so major of a problem then we wouldn't be using them much 
right now.

	Dave Smiley

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

View raw message