What is your evaluation of the proposal?
I think it’s good. The need for raw string literals can be common in certain situations and having a simple syntax for them makes them simple to use.
I doubt this proposal will be enough though. There should be a way to include a double-quote in a raw string literal.
Is the problem being addressed significant enough to warrant a change to Swift?
I think it’s worth adding better support for raw strings.
Does this proposal fit well with the feel and direction of Swift?
Some people don’t like the
r prefix. I don’t care much. A one-letter prefix has the advantage of keeping option opens for adding new forms of string literals in the future (we still have many letters to choose from). It’d be nicer if we could do without though, but I appreciate the number of non-alpabetic modifier characters available for this purpose is limited given that string literals are often adjacent to operators.
If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
The D language has many string literals, including one identical in syntax and semantics to this proposal. As far as I know, it’s very useful for file paths on Windows and regular expressions. If you need quotes inside a raw string in D, you can escalate to the delimited string literal which is more versatile but a bit more complicated to parse in your head.
Also, I don’t think all those string literals in D makes the language more complicated. It’s somewhat obvious what they are in context… except perhaps for D’s token string literal which doesn’t look like a string at all.
How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
Read the proposal.