[Pharo-project] [COTDC] 91 - WeakOrderedCollection
Awesome momentum! There are 20 comments waiting to be integrated + some already in from Squeak!!! Continuing in Collections... Today: WeakOrderedCollection Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
I am as an OrderedCollection with the only difference that I hold weakly into the objects you add. For more details, read my tests in WeakOrderedCollectionTest. On Tue, Dec 6, 2011 at 5:07 AM, DeNigris Sean <sean@clipperadams.com> wrote:
Awesome momentum! There are 20 comments waiting to be integrated + some already in from Squeak!!!
Continuing in Collections...
Today: WeakOrderedCollection
Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
-- Mariano http://marianopeck.wordpress.com
On 06.12.2011 05:07, DeNigris Sean wrote:
Awesome momentum! There are 20 comments waiting to be integrated + some already in from Squeak!!!
Continuing in Collections...
Today: WeakOrderedCollection
Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest I am the equivalent of an OrderedCollection which has had setCollection: called with a WeakArray argument (before growing). In use, contrasted to how you expect a OrderedCollection to behave normally, be aware objects are not "remove:'d" from me when not referenced elsewhere, but merely nilled. So guard against nils when iterating/accessing, and don't expect a #size which means the same.
Cheers, Henry
Thank you Mariano and Henrik! -- View this message in context: http://forum.world.st/COTDC-91-WeakOrderedCollection-tp4164903p4166075.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (4)
-
DeNigris Sean -
Henrik Sperre Johansen -
Mariano Martinez Peck -
Sean P. DeNigris