Hey all, I wrote a post about the problem of writing into uninitialized memory across trait boundaries. It looks at the solution proposed in RFC 2930, and look at covers potential alternative solutions.
In particular it was inspired by this comment on the tracking issue for RFC 2930, which got me wondering what the ergonomics of using Vec::spare_capacity_mut
could be like.
I hope folks find this interesting! In particular I'm keen to learn more about the limitations of overloading, whether I understood the interactions between dyn
and overloading correctly, and to which degree restrictions on those interactions could be loosened. Thanks!