[swift-evolution] [Pitch] Raw mode string literals

Chris Lattner clattner at nondot.org
Thu Nov 23 15:48:02 CST 2017



> On Nov 23, 2017, at 11:10 AM, Brent Royal-Gordon <brent at architechies.com> wrote:
> 
> On Nov 23, 2017, at 11:15 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
>> Until we figure out that path forward for regex’s, I think they aren’t the right motivation for this proposal.
> 
> 1. Even in our shining pattern matching future—a future which I, for one, am eager to hasten—we will still need to interoperate with NSRegularExpression and other Perl 5-compatible regex engines.

We already interoperate with those other engines.  When we have an awesome default answer, I don’t see why we’d be compelled to sugar them any more.

> 2. Code generation.
> 
> 3. Windows-style paths. 
> 
> 4. Doesn’t LaTeX use backslashes?

Right, I’m only objecting to regex as the motivation.

-Chris


> 
> 5. Etc. 
> 
> I think the Motivation section undersells this proposal. Regexes are a strong short-run use case, but in the long run, we’ll need this for other things. In both cases, though, raw literals will be a useful addition to the language, improving the clarity of Swift code much like multiline literals already have. 
> 
> -- 
> Brent Royal-Gordon
> Sent from my iPhone
> 

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


More information about the swift-evolution mailing list