All lists should be lists. Distinction between FixedSizedList and List was a mistake. The key part of what allows vortex to be powerful is ability to swap the physical representation of the array transparently depending on the operation, the problem with FixedSizedList is that its a purely physical encoding without meaningful logical difference.
You can express FixedSizedList array as a ListView with sequence offsets and constant sizes. This is a bit of additional metadata but not that much to forgo other benefits
Goal
The key issue with FixedSizedList is that it enforces certain kind of physical encoding logically and physically. The actual optimisation here is that the physical layout is so special that you promote it to the logical one. However, logically this is still a list. There's potential difference here if you were to forbid nested types as values but that's not the distinction vortex wants to enforce.
The particularly painful part here is that we want to support operations that lets us freely reorder/truncate/shuffle our arrays and FixedSizedList supports none of that. In order to workaround this limitation we have invented additional encodings like PiecewiseSequence which is a useful encoding to express operations on lists but a lot of operations are easier if the encoding natively supports reordering.
Additional problem is that FixedSizedListArray is not good at expressing sparse arrays since it's designed for dense values. There are cases where you want it but often you want the sparse variant, i.e. ListView.
The thing to liken it to is dynamic typing. I think Vortex needs more of it so array encodings are more broadly applicable. We can always specialise for cases where the array looks like a fixedsizedlist array but we don't need to require it
Alternatives
We could store DType in our ListView encoding and have it support both FixedSizedList DType and regular List DType, we would need to assert that sizes is a constantarray, while I think this is useful intermediary state this issue is here to track the ideal end state.
All lists should be lists. Distinction between FixedSizedList and List was a mistake. The key part of what allows vortex to be powerful is ability to swap the physical representation of the array transparently depending on the operation, the problem with FixedSizedList is that its a purely physical encoding without meaningful logical difference.
You can express FixedSizedList array as a ListView with sequence offsets and constant sizes. This is a bit of additional metadata but not that much to forgo other benefits
Goal
The key issue with FixedSizedList is that it enforces certain kind of physical encoding logically and physically. The actual optimisation here is that the physical layout is so special that you promote it to the logical one. However, logically this is still a list. There's potential difference here if you were to forbid nested types as values but that's not the distinction vortex wants to enforce.
The particularly painful part here is that we want to support operations that lets us freely reorder/truncate/shuffle our arrays and FixedSizedList supports none of that. In order to workaround this limitation we have invented additional encodings like PiecewiseSequence which is a useful encoding to express operations on lists but a lot of operations are easier if the encoding natively supports reordering.
Additional problem is that FixedSizedListArray is not good at expressing sparse arrays since it's designed for dense values. There are cases where you want it but often you want the sparse variant, i.e. ListView.
The thing to liken it to is dynamic typing. I think Vortex needs more of it so array encodings are more broadly applicable. We can always specialise for cases where the array looks like a fixedsizedlist array but we don't need to require it
Alternatives
We could store DType in our ListView encoding and have it support both FixedSizedList DType and regular List DType, we would need to assert that sizes is a constantarray, while I think this is useful intermediary state this issue is here to track the ideal end state.