Hi adrian
I like your smart sets better than my uniqueOrderedCollection. The problem with UniqueOrderedCollection is that it is not clear what to do with add:before: and the like. Since we cannot garantee the order anyway.
Stef
In fact the protocol of OrderedCollection is not conceptually the same as GrowingArray. This is fun to see that for simple usage we do not really care of the fat interface of OrderedCollection and would benefit of a simpler one. So may be traits are the way to go.
may be we should use SmartSet in Moose instead of OrderedCollection? Is there any plans for that. I would be in favor.
Stef
On 19 déc. 07, at 20:21, stephane ducasse wrote:
Hi adrian
I like your smart sets better than my uniqueOrderedCollection. The problem with UniqueOrderedCollection is that it is not clear what to do with add:before: and the like. Since we cannot garantee the order anyway.
Stef _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
may be we should use SmartSet in Moose instead of OrderedCollection? Is there any plans for that. I would be in favor.
You mean for all multivalued things (which are not keyed)? I guess this would not work for all arbitrary metamodels; which might depend on the location of elements; and the amount of occurrences?
Btw, I put an implementation of my opposites in the VW implementation of Fame. The implementation can be found under Fame-Slots, and is used in the definition of the FM3 classes. I'm working on porting all my Python-Fame stuff to VW now.
cheers
may be we should use SmartSet in Moose instead of OrderedCollection? Is there any plans for that. I would be in favor.
You mean for all multivalued things (which are not keyed)? I guess this would not work for all arbitrary metamodels;
But in that case they would have to be explicit about it. Now in Famix we can use either SmartSet or UniqueOrderedCollection to convey that we do not have duplicates
which might depend on the location of elements; and the amount of occurrences?
Btw, I put an implementation of my opposites in the VW implementation of Fame. The implementation can be found under Fame-Slots, and is used in the definition of the FM3 classes. I'm working on porting all my Python-Fame stuff to VW now.
cheers _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev