[Newbies] How to empty a collection?
cdrick
cdrick65 at gmail.com
Tue Feb 19 15:54:32 UTC 2008
>
> I'm pretty certain I did not suggest anything like this. Nothing is
> broken here, so let's not fix it.
My mistake, I'm sorry...
It was Goran:
"Because modifying the collection while iterating over the same is not
safe generally. The above idiom is "known" - but of course it sucks. :)
I advocated to add a #removeAll message in the protocol of Collection
and then implement it in subclasses using efficient variants a looooong
while back but it never got accepted. The climate today for such a
change is much more... "pragmatic" I think and hope. So we should simply
add it!"
I'm really tired today... ;)
See you
Cédrick
More information about the Beginners
mailing list