|
Re: Re: Recap: How to empty a collection: msg#00139lang.smalltalk.squeak.beginners
Ok, I reimplemented this method as Bert suggested and in the next version of Aida/Web it will be: OrderedCollection>>removeAll "remove all elements quickly" self removeAllSuchThat: [:each | true]. "Squeak specific" " self become: OrderedCollection new " "VW specific" Note that this method is still an extension of Aida and it must therefore be portable among dialects, which is the reason of commented code for VW above. Best regards Janko Bert Freudenberg wrote: On Feb 20, 2008, at 2:01 , nicolas cellier wrote: One thing I wasn't clear on is whether Bert's suggestion: Bert's suggestion is simple and works well. #removeAllSuchThat: is actually optimized in subclasses (look at its implementation in OrderedCollection). -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: Recap: How to empty a collection, Bert Freudenberg |
|---|---|
| Next by Date: | Re: Re: Recap: How to empty a collection, Janko Mivšek |
| Previous by Thread: | Re: Re: Recap: How to empty a collection, Bert Freudenberg |
| Next by Thread: | Re: Re: Recap: How to empty a collection, Janko Mivšek |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |