You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2002/06/25 20:41:52 UTC

Re: [Commons-Avalon:collections] Buffer integration [was: code in tegration]


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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>