[Newbies] Re: Recap: How to empty a collection
Klaus D. Witzel
klaus.witzel at cobss.com
Wed Feb 20 06:02:00 UTC 2008
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 :)
More information about the Beginners