Hi!
Lex Spoon lex@cc.gatech.edu wrote:
goran@krampe.se writes:
And since you are then rumming about in Collection and friends - add #removeAll while you are at it with efficient implementations in suitable subclasses. I tried a few years back but got my head bitten off and retreated. ;)
Curiously, there is no removeAll method in Collection, in 3.7, 3.8, or 3.9. There are very few removeAll methods at all, most are not in the Collection hierarchy, and one of them is deprecated. Maybe you are thinking of a *proposed* removeAll method or methods?
Yes, I am proposing to add it. I wrote *add* :). I argumented for such a method a few years back but as I said - I did not have the energy to argue with other prominent Smalltalkers saying that it was a bad idea. I still think it is an obviously good idea - especially since it can be concretely efficiently implemented in selected subclasses.
Speaking of which, why is SharedQueue2>>removeAll marked "Deprecated3.9". It seems like a useful method, and there is no replacement. Especially odd is that SharedQueue2>>flush is marked as "deprecated: 'use removeAll'".
-Lex
No idea. I also think SharedBufferStreams on SM is better than SharedQueue. ;)
regards, Göran