[swift-evolution] multi-line string literals

Travis Tilley ttilley at gmail.com
Mon Dec 14 16:57:04 CST 2015


StringLiteralConvertable is more than sufficient for bending string
literals to your will. There's already several libraries that make use of
that, plus custom operators, to implement regular expression literals. Lets
not get too carried away and stick to defining the syntax for the literal
itself... I'm pretty sure the community will amaze us with what happens
afterwards and none of it will require macros.


​-Travis Tilley​



On Mon, Dec 14, 2015 at 5:51 PM, Andrey Tarantsov <andrey at tarantsov.com>
wrote:

> BUT... And this is a massive but... It -would- tie into the discussion
> that currently exists for typed literals (something i'm currently mostly
> ignorant of and would love to hear more about). Especially since it would
> put the qualifier in front of the literal.
>
>
> I'm basically expecting a prefix like r'c:\program files\swift\swift.exe'
> to be the best solution. :-)
>
> And yes, would be nice to have other and user-defined prefixes, although I
> would say that it should wait until a proper macro support. A
> user-definable prefix *is* a simple form of a macro, after all.
>
> A.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151214/77526f24/attachment.html>


More information about the swift-evolution mailing list