[swift-evolution] Thoughts on replacing \() with $() or some other symbol

João Pinheiro joao at joaopinheiro.org
Wed Jun 22 09:33:15 CDT 2016


On 22 Jun 2016, at 09:39, Goffredo Marocchi via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Sorry, but can you explain why the character used to   escape   strings is also the best choice to do   Variable value extraction/String interpolation?  They are two different concepts.

One could argue they are different concepts, but that would be prioritising absolute purity over simplicity and clarity.

The current \() method is simple, clear, and easy to type and read. It's also compatible with the use of \ as an escape character which is a huge plus. I don't think it makes sense to replace it with another character simply for absolute purity's sake, especially if such a substitution would introduce another character that would require escaping.

Sincerely,
João Pinheiro


More information about the swift-evolution mailing list