Right, I don't need these matrices to grow, I know their permanent sizes when I create them, and I used to use slices::from_elem but that went away a few days ago. I always assumed that ~[T] was more like a builtin, fixed size, array, and Vec a growable vector.
I imagine that this will all get sorted out one day, and I can accept these inefficiencies now since I don't use Rust for real work yet, but I would be disappointed if array index notation is removed from the default array-like type. On Sun, May 4, 2014 at 4:10 PM, Daniel Micay <[email protected]> wrote: > On 04/05/14 07:03 PM, Brian Rogoff wrote: > > Fair enough, but I hope that the Index trait overhaul is merged before > > the ability to use slices like this is removed. To do otherwise would be > > unpleasant. > > The ability to grow ~[T] was already removed, and it would be really > nice to remove the remaining users to improve performance by avoiding > expensive conversions from Vec<T>. The original motivation behind Vec<T> > was a performance one (it was just going to become the ~[T] > implementation via a lang item) so it's quite sad that we've introduced > a whole bunch of O(n) copies throughout the compiler to previously O(1) > algorithms. > > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
