On 12-07-28 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.

Thoughts?

A few:

  - "doh!"
  - "yes, of course"
  - so _that_ is why [] and "" should have type foo& not foo/_
  - i.e. we should make [] evaluate to &[] too, and choose its
    lifetime by analysis of the arguments; this merges with the
    bug for constant vectors

Good catch.

-Graydon

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

Reply via email to