[swift-evolution] multi-line string literals

Andrey Tarantsov andrey at tarantsov.com
Mon Dec 14 13:06:03 CST 2015


> What is the reason that normal strings "..." don't support newlines? It's not traditionally seen in C-inspired languages, but it's hardly unusual outside that sphere[*]. Ruby and HTML are probably the most common examples, but apparently OCaml and Lisps also allow it?

> You'd have to ask Chris Latter and Dmitri Gribenko, who are responsible for the lines in Lexer.cpp that prevent it: 

The obvious reason is to catch a missing quote early, with a better error message. I believe it should stay that way, because multiline strings are a lot less widespread.

A.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/0ce0ebf1/attachment.html>


More information about the swift-evolution mailing list