On Sat, Nov 9, 2013 at 8:53 AM, spir <[email protected]> wrote:

>
> Can we, then, even consider the opposite: having a sigil for static data
> (mainly literal strings stored in static mem, I'd say) or generally
> non-heap data (thus including eg static arrays stored on stack)? The
> advantage is that this restores coherence between all heap of heap data.
> I'd use '$'! (what else can this sign be good for, anyway? ;-)
>
> [But where should the sigil go? In front of the data literal, as in
>         let stst = $"Hello, world!";
>         let nums = $[1,2,3];
> or in front of the type, or of the id itself?]
>
> Also, is it at all possible, in the long term maybe, to consider letting
> the compiler choose where to store, in cases where a possible pointer is
> meaningless, that is it does not express a true reference (shared object,
> that a.x is also b.y), instead is used for technical or efficiency reasons
> (that memory is not elastic!, for avoiding copy, etc...)?
>
> Denis


All variables in Rust are stack-allocated values. A unique pointer is a
pointer stored on the stack, and may be defined as a library type.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to