Closed bjarthur closed 9 months ago
The docs do specify that this is undefined behavior...
The problem is fixing it has a performance impact as it makes all indexing type unstable.
One option is to stop using types to specify lookup order, and have bool flags instead. But that also has a performance cost.
Basically there is no way to handle this corner case without a cost to all the common use cases. So Im not sure what to do about it.
Probably manually updating the lookup order yourself with set(A, X=>Unordered())
(where X is the dimension) is the best option.
ok, thanks, sorry i missed it in the docs. will close.
If you have any ideas and opinions on fixing it it is up for debate, but its not an easy thing to do.
if i index an ordered dimension with indices that are unordered, the returned array is unordered but the type says it is ordered. subsequent indexes into this latter array then fail: