// An exchange heap (owned) stringlet exchange_crayons: ~str =
~"Black, BlizzardBlue, Blue";


can you clarify us?

thx!
-----
Gaetan



2013/11/8 Daniel Micay <[email protected]>

> On Thu, Nov 7, 2013 at 7:49 PM, Jason Fager <[email protected]> wrote:
>
>> Can you speak a little to the practical differences between owned boxes
>> and ~[T]/~str?  How does the difference affect how I should use each?
>
>
> I wrote the section on owned boxes in the tutorial currently in master, so
> I would suggest reading that. It's very rare for there to be a use case for
> an owned box outside of a recursive data structure or plugin system (traits
> as objects).
>
> The coverage in the tutorial of vectors/strings is not only lacking in
> depth but is also *incorrect*, so I understand why there's a lot of
> confusion about them.
>
> Vectors/strings are containers, and aren't connected to owned boxes any
> more than HashMap/TreeMap/TrieMap. I would prefer it if the syntactic sugar
> didn't exist and we just had generic container literals, because it seems
> to end up causing a lot of confusion.
>
> _______________________________________________
> 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