On Thu, Nov 7, 2013 at 6:32 PM, Liigo Zhuang <com.li...@gmail.com> wrote:
> > Owned boxes shouldn't be commonly used. There's close to no reason to > use one for anything but a recursive data structure or in rare cases for an > owned trait object. > > > > http://static.rust-lang.org/doc/master/tutorial.html#boxes > > > > It's important to note that ~[T] and ~str are not owned boxes. They're > just sugar for dynamic arrays, and are common containers. > > > It's so confusing. If it's not owned box, why not remove ~? Make "str" > default be dynamic should OK. > It wouldn't be okay for every string literal to result in a heap allocation.
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev