Good idea.
I'll write one right now.
AA loves writing custom collections :)
On 22 Nov 2007, at 21:32 , Stéphane Ducasse wrote:
I thought so.
Now would it be not better to add UniqueOrderedCollection so that
this is in the contract of the class
to only add element if it is not there and to waste less space than a
set?
In that case can you edit the class comment and mention that they are
unique collection?
Something related I would like to have a flatCollect with which I do
not have to do asSet at the end.
So a kind of flatUniqueCollect that still return an
UniqueOrderedCollection instead of a set
Does it make sense to implement and use UniqueOrderedCollection or
UniqueArray?
Implementation issue.
Set is based on dictionary and thus a waste of memory. We want low
memory footprint and fast access (adding is only down when loading a
model). Array is the best solution, occasionally adding element with
copyWith:. But we should make sure that no duplicates are added, and
raise error if someone tries so! I guess that test is missing.
AA
On 22 Nov 2007, at 15:28 , stephane ducasse wrote:
or an OrderedSet?
Stef
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev