Resizing of vectors is currently supported only at the end (but after #57313 is merged, it will be possible to resize also at the start).
I think that having in the API something along the lines of resizeat!(a::Vector, n::Int, pos::Int) where pos indicates the position of the resizing makes sense (and similar for BitVector).
There is already an internal function to allow that for a Vector, i.e. _growat!, which has the nice property that the more you are near the extrema the more the resizing is faster.
Resizing of vectors is currently supported only at the end (but after #57313 is merged, it will be possible to resize also at the start).
I think that having in the API something along the lines of
resizeat!(a::Vector, n::Int, pos::Int)whereposindicates the position of the resizing makes sense (and similar forBitVector).There is already an internal function to allow that for a
Vector, i.e._growat!, which has the nice property that the more you are near the extrema the more the resizing is faster.