[swift-evolution] multi-line string literals
Travis Tilley
ttilley at gmail.com
Fri Dec 11 01:07:44 CST 2015
Chris - due to the complexity involved, would it make sense to have
multiple proposals? One syntax need not fulfill the needs of every use
case. My immediate and personal concern is the simplest possible syntax for
multi-line string literals with no behavioral differences from normal
string literals other than 1) the ability to span multiple lines and 2) the
ability to contain unescaped quotes as long as they are not triple quotes.
As additional features, the potential indentation handling previously
discussed in this thread would be a massive bonus that'd make life easier.
Additional proposals for full-on heredoc syntax with both indentation aware
and ignoring syntax (as is typical in other languages) could be made and
implemented separately.
I have no use for an escape-ignoring/escape-unrequiring syntax and would
have to leave that up to others to flesh out and/or implement. This would
make most sense with a heredoc style syntax where the terminator is a very
specific string.
I also have no use for specifying a dialect for a string, which Jordan Rose
suggests is useful for shaders, and have no idea how to implement such a
feature.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151211/c8e16295/attachment.html>
More information about the swift-evolution
mailing list