logo       

Re: Recap: How to empty a collection: msg#00136

lang.smalltalk.squeak.beginners

Subject: Re: Recap: How to empty a collection

On Wed, 20 Feb 2008 02:01:49 +0100, nicolas cellier wrote:

...
Bert's suggestion is simple and works well.
The only question is about efficiency.
Up to (Down to?) subclasses to optimize it.

Some proposed an alternative based on (self removeAll: self), and started writing optimized versions of #removeAll:.

No, (anOrderedCollection removeAll: anOrderedCollection) was not optimized. It had a *very* long known bug, which was fixed. Please do less mixing of subjects in threads.

I think our biggest problem is that we have plenty possible ways to do it... Finding a balance between genericity and efficiency...

No, more correctness at the price of less efficiency :)

Nicolas


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise