|
Re: Recap: How to empty a collection: msg#00160lang.smalltalk.squeak.beginners
Klaus D. Witzel a écrit : On Wed, 20 Feb 2008 02:01:49 +0100, nicolas cellier wrote: OK, I'm extrapolating. In this case, while you are at it: | aSet | aSet :='Klaus' asSet. aSet removeAll: aSet. aSet | aHeap | aHeap := Heap withAll: 'Witzel'. aHeap removeAll: aHeap. aHeap I would have used my name, but it seems i am removeable ;-) | aSet | aSet :='Cellier' asSet. aSet removeAll: aSet. aSet Try with the collection of your choice. In the mean time, don't use (self removeAll: self)... Yes i'm mixing threads,should be How to NOT empty a collection ;-) Nicolas I think our biggest problem is that we have plenty possible ways to do it... Finding a balance between genericity and efficiency... Agree on this one. Then allow removeAllSuchThat: as default implementation. Nicolas
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ordinary #hash and Dictionary [was: Recap: How to empty a collection], nicolas cellier |
|---|---|
| Next by Date: | Re: Re: is 0.1 a Float or a ScaledDecimal ?, johnps11 |
| Previous by Thread: | Re: Recap: How to empty a collection, Klaus D. Witzel |
| Next by Thread: | Re: Recap: How to empty a collection, Klaus D. Witzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |