You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In practice it has turned out that every one of our concrete collection's non random-access indices holds a reference to the collection it traverses. This introduces complexity in implementations (especially as we try to avoid multiple-reference effects that can cause unnecessary COW copies – see Dictionary and Set) and presumably translates into less-efficient codegen. We should consider other schemes.
There are index-less schemes (c.f. D), but we should also consider a scheme where generic indices can't be moved without participation from the collection itself, e.g. collection.nextPosition(index). This would complicate generic code a bit, but working with Array would remain as simple as ever. We could even consider whether random access is special and RandomAccessIndex ought to be incrementable without a collection, although that may give up some error checking opportunities.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 2f461f0712f247f057a521e4163df0e2
Issue Description:
In practice it has turned out that every one of our concrete collection's non random-access indices holds a reference to the collection it traverses. This introduces complexity in implementations (especially as we try to avoid multiple-reference effects that can cause unnecessary COW copies – see
Dictionary
andSet
) and presumably translates into less-efficient codegen. We should consider other schemes.There are index-less schemes (c.f. D), but we should also consider a scheme where generic indices can't be moved without participation from the collection itself, e.g.
collection.nextPosition(index)
. This would complicate generic code a bit, but working with Array would remain as simple as ever. We could even consider whether random access is special and RandomAccessIndex ought to be incrementable without a collection, although that may give up some error checking opportunities.The text was updated successfully, but these errors were encountered: