>> >>>> what is the diff between arrayList and vectorList ? >> >>> >> >>> ArrayList is double ended (very much like OrderedCollection), >> >>> VectorList is single ended. I was just experimenting to see if it >> >>> makes a difference. >> > >> > ok. I like to see such kind of experiment. >> > Was the name based on something that people use? >> >> No, it is a randomly chosen and meaningless name. I guess in the end >> there will only be one named ArrayList, but I am not sure which >> implementation is better. >> >> Just a note to the VM developers: The primitive >> Array>>#replaceFrom:to:with:startingAt: is absolutely central to the >> implementation of efficient collections. While it works well if you >> copy from one array to the other, it is broken if source and >> destination array are the same and the areas overlap. Would it be >> possible to fix this. Even "memmove(void*, void*, size_t)" in C can >> handle this situation correctly. > > The problems are that the primitive is defined to be destructive, and code > could be depending on the destructive update behaviour. Would it be feasible > to use a new primitive that did the right thing in the case of overlap, or do > you definitely want to change primitive 105?
A new primitive would be prefect. Like this we can even have a nice fallback in case the VM doesn't have the primitive yet. Lukas -- Lukas Renggli www.lukas-renggli.ch