I agree with your point about it being asymetrical. And if it were real cheap to build an index, I would be already convinced to make it symetrical.
Yes, depending on the quantity of index in a MagmaCollection, it can be very expensive. I will avoid it myself, I documented this aspect in http://wiki.squeak.org/squeak/5859
But this precisely why the "the minimum needed to satisfy the request" was chosen. If you want to add the additional indexes that are on the original collection, it is easy to do so via #addIndex.
In fact, you could add your own extension if you wanted;
MagmaCollectionReader>>#ensureIndexesOf: anotherMagmaCollection
which would add whatever indexes were needed to make your MagmaCollectionReader have the original indexes of anotherMagmaCollection.
Symmetry in your code would then be achieved by *always* sending this method, which would be a no-op for optimized-Readers.
Regards, Chris
- Chris