On 7/28/12 7:38 PM, Patrick Walton wrote:
I'd like to propose that unadorned string literals instead have the type &static.str, which mirrors how it (usually) works in C and C++. To get the current behavior one would write "Hello world"/_. This is slightly inconsistent with vectors, but string literals are special anyway in C and C++. This will make almost all the ~" punctuation-diphthongs that are peppered throughout Rust code go away.

I'm not sure why this step alone would remove the ~"" strings, rather than (say) causing type errors for those cases where ~str is required but &str is supplied. It seems that the most important thing is to convert the various APIs that can take slices to do so. Or am I missing something?


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

Reply via email to