Closed MaikKlein closed 6 years ago
Worst case scenario is that we might have to abstract over arrays with traits
fn foo(arr: impl Array<Item = f32>) {...}
Where the trait Array
is implemented for dynamic arrays (slices) and static arrays of various sizes.
To which type should
OpTypeRuntimeArray
map?We could potentially map it to
&[T]
, which would then be the only type allowed in structs that is a ptr type. This should be the most ergonomic change, but it might be a bit tricky to implement.Also how does this interact with
OpTypeArray
, I don't think we can deref an array into a runtime array.