[squeak-dev] The Trunk: Collections-ar.129.mcz

Göran Krampe goran at krampe.se
Mon Sep 14 09:44:56 UTC 2009


Hi again!

Göran Krampe wrote:
> Now that we are actually touching these classes again :) - how about 
> adding Collection>>removeAll? With proper implementations in subclasses.
> 
> I don't have a current trunk in front of me, so perhaps it has already 
> been done. Why you may ask? It preserves identity (instead of creating a 
> new collection) and it can be implemented really fast in some 
> subclasses. A default implementation in Collection can be:
> 
> "self copy do: [:each | self remove: each]" ...or whatever.
> 
> A few years back when I proposed it... well :)

A link into that thread:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-August/043750.html

Hehe, it was 7 years ago. And oh, btw, sitting in front of VS2008 (don't 
ask why) and in C# I find the method Clear() in both List and 
Dictionary. It is IMHO silly, silly, silly that we don't have something 
similar.

regards, Göran




More information about the Squeak-dev mailing list