SE-0200: Enhancing String Literals Delimiters to Support Raw Text

  • What is your evaluation of the proposal?

+1 for the raw delimited. -1 for adding interpolation to raw strings.

  • Is the problem being addressed significant enough to warrant a change to Swift?

Adding raw strings is absolutely needed.
I think adding interpolation to raw strings is misguided as it completely undermines the idea of a "RAW" string in a code base. "Hey, I thought this was a raw string why are these pound not rendering". One of the only use cases I was thinking in which raw string interpolation would be useful for me is perhaps creating a SQL string. In those cases people use a token like @MYTOKEN which then is replaced using a library that makes sure no SQL is injected. The SQL interpolation is not a good use case because of SQL injection.

There is also the issue with string interpolation having some performance issues String interpolation revamp: design decisions

If we ever wanted to add some form of string highlighting to raw string รก la markdown code blocks, we would quickly find that any magical interpolation syntax will get in the way of a clean color highlighting experience.

I think we should wait on string interpolation until we have a better idea how regex will fit in the string story. Interpolation should be its own proposal once the interpolation issues linked above have been addressed and regex syntax has been resolved.

  • Does this proposal fit well with the feel and direction of Swift?

Yes, the raw string part only.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Maybe java's ``` , but they chose not to implement raw interpolation.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Participated in the tread before and read the new proposal.