On Tue, Sep 24, 2013 at 12:44 PM, Benjamin Striegel
<ben.strie...@gmail.com>wrote:

> > I think string literals should contain exactly what they contain in
> their source form, without any additional processing. If you want to
> express characters that are inconvenient to type, you can use control
> sequences and a (standard) formatting library to produce them.
>
> I'm actually very intrigued by the idea of eliminating escape characters
> altogether in the default string literals. Would follow nicely from how we
> allow newlines in string literals. We'd have to give up the optional
> "whitespace-chomping" behavior around newlines, though, which would make me
> pretty sad. And are you really willing to force everyone who wants to
> include a quotation mark in a string to go through a syntax extension to do
> it?
>

Yes! It seems to me that many/most string literals are used for in
conjunction with various formatting functions anyway, so I wouldn't think
it would be a big deal in practice. Throwing in a call to fmt isn't a big
burden, imo.


-- 
Sebastian Sylvan
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to