[FIX][ENH] SortedCollection robustness & speedup
Georg Gollmann
georg.gollmann at tuwien.ac.at
Mon May 8 08:12:00 UTC 2000
At 22:19 Uhr +0200 04.05.2000, Stefan Matthias Aust wrote:
>At 09:47 02.05.00 +0200, Georg Gollmann wrote:
>>
>>1) Your changeset unblocks addLast: for SortedCollection which
>>opens the door for sort order corruption. Avoiding that was the
>>main point of my changes.
>
>Yes, I know. Unfortunately, my change sorter and stuff broke, so I
>undid your change instead of trying to hunt down all broken things.
>We should retarget that change for 2.9a as 2.8 is near and it might
>risk stability.
>
To avoid this brittleness we could
a) implement addLast: in SortedCollection as ^self add: newObject
b) swap the implementations of add: and addLast: in OrderedCollection
I prefer b) since I suspect that addLast: is often used just for
performance reasons. This overspecifies the intent.
Of course this "do what I mean" approach is not for the purists.
The current version of my manglings is at:
http://macos.tuwien.ac.at/Squeak/SortedCollFix.st
Georg
--
----
Dipl.Ing. Georg Gollmann TU-Wien, Zentraler Informatikdienst
Wiedner Hauptstr. 8-10
phon:(+43-1) 58801 - 42022 A-1040 Wien
fax: (+43-1) 58801 - 42099
mail:gollmann at zid.tuwien.ac.at
http://macos.tuwien.ac.at/Gollmann.html
More information about the Squeak-dev
mailing list
|