On Nov 8, 2013, at 9:38 PM, Daniel Micay <[email protected]> wrote:
> On Sat, Nov 9, 2013 at 12:36 AM, Kevin Ballard <[email protected]> wrote:
> On Nov 8, 2013, at 2:21 PM, Patrick Walton <[email protected]> wrote:
>
> > I know that many people don't like the fact that, syntactically, vectors
> > and strings have a sigil in front of them, but please consider that there
> > are many design constraints here. What works for another language may not
> > work for Rust, because of these constraints.
>
> Personally, I find it great that they have a sigil in front of them. It
> reminds me that they're stored in the heap.
>
> -Kevin
>
> Since library containers, smart pointers and other types don't have them, I
> don't think it's helpful in that regard.
Well no, you can't assume that the absence of a sigil means the absence of heap
storage. But for types that are possibly not stored on the heap, such as str
(which can be &'static str) and [T] (which can be a fixed-size stack-allocated
vector), the ~ is a useful distinction.
-Kevin
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev