[Newbies] How to empty a collection?

Ramon Leon ramon.leon at allresnet.com
Wed Feb 20 00:42:15 UTC 2008


> > Well, of course you're not *supposed* to be doing this. But 
> you could, 
> > and it would only be half-evil ;)
> It wouldn't be evil at all.  This is Smalltalk, not Ada!!
> 
> But seriously, it seems a major oversight that such a basic 
> task isn't in the standard protocol.  The language has been 
> around a while, someone else must have wanted to empty a collection.
> 
> --
> Jeffrey Straszheim
> http://straszheim.50megs.com

It not being standardized just means there's no consensus to the *right* way
to do it.  I'd bet many of us have our own versions of #removeAll in our
images, I know I do.

Ramon Leon
http://onsmalltalk.com



More information about the Beginners mailing list