So the new Vec and Str/StrBuf types are all "reference" types, correct?
What happens if we pass around a borrowed or owned pointer to one of these
types? Won't there be an extra level of indirection to get to the
underlying data pointer?

--
Ziad


On Tue, Apr 15, 2014 at 11:10 AM, Corey Richardson <[email protected]> wrote:

> `box "foo"` would create a SomeBox<&'static str>, as outlined in the
> meeting notes:
>
> box "foo" -> Heap<&'static Str>
> "foo".to_owned() -> Heap<Str> (or ~Str)
> Heap::from("foo") -> Heap<Str> (or ~Str)
> Rc::from("foo") -> Rc<Str>
>
> On Tue, Apr 15, 2014 at 2:06 PM, SiegeLord <[email protected]> wrote:
> > On 04/15/2014 01:12 PM, Patrick Walton wrote:
> >>
> >> The new replacement for `~"foo"` will be `"foo".to_owned()`. You can
> >> also use the `fmt!()` macro or the `.to_str()` function. Post-DST, you
> >> will likely also be able to write `Heap::from("foo")`.
> >
> >
> > Why not `box "foo"`? Is that scheduled to break?
> >
> > -SL
> >
> >
> > _______________________________________________
> > Rust-dev mailing list
> > [email protected]
> > https://mail.mozilla.org/listinfo/rust-dev
>
>
>
> --
> http://octayn.net/
> _______________________________________________
> 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

Reply via email to