commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [Commons-Avalon:collections] Buffer integration [was: code in tegration]
Date Tue, 25 Jun 2002 18:41:52 GMT


Jack, Paul wrote:
...
> So if nothing else, I'd like Buffers to include an iterator.  But
> once they do, the other Collection routines become easy, as all of
> them can be implemented in terms of the iterator (this is what 
> AbstractCollection does).  
> 
> I really believe that having Buffer extend Collection will meet many
> more users' needs.

I think that every [collection] calss should implement the Collection
if it is possible.
It has the advantage of consistency and usability of the interface for 
basic common operations.

*Every* *single* class of Collections can be used in a bad way, and 
methods can be used that are suboptimal, or even slow.
Devs have to decide anyway what is best, let's not decide for them now.

For example, a collection class can have a method that is really slow, 
but if it's called once every 1000 other calls, and is useful, it won't 
do any harm.

I say, if someone wants to implement the interface it's ok for me, it 
won't hurt performance for the core methods of the class anyway.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message