On 12 Nov 2013, at 10:21 am, Gaetan <[email protected]> wrote:

> - as a typicial rust programmer, will i see the usage of "str" or "~str" as 
> logic or will i have to copy paste some sample code each time "because it 
> works this way in rust”

This is what I thought at first, but once you use it for a while it will become 
natural, and you will find the distinction very useful. Just give it a chance 
before you jump to conclusions - you won’t regret it! :)

> - the boilder plates theory. Can i avoid them? I think a good modern language 
> should allow me to avoid writing useless code, each time the same things. 
> That is the real mess with C++.

They are not useless - `~str`, `&str`, `&'a str` and `&'static str` all convey 
extremely important semantic information both to the programmer and to the 
compiler. Changing `~str` to `str` would cause more inconsistencies (what about 
the borrowed pointers?) with a loss of the afore mentioned semantic information.

~Brendan
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to