Sorry, I realized I had a little more to say about this.

> On Apr 9, 2017, at 8:46 PM, Félix Cloutier <felix...@yahoo.ca> wrote:
> 
> C# was able to eliminate the whole class of SQL injections by introducing a 
> convenient and powerful syntax for queries that is not string-based. I think 
> that Swift should be moving in that direction, especially since no one has 
> made any other case for long strings so far.

LINQ is, by all accounts, a pretty nice feature. It also seems to have taken at 
least five years to develop. We cannot realistically hope to put that kind of 
effort into a beautifully crafted, language-integrated solution to every 
problem that a Swift developer could solve with a five-line string literal, 
particularly when many will be highly domain-specific: generating config files 
or source code, communicating with a half-dozen NoSQL databases with disparate 
query languages and capabilities, even just writing tests that check the output 
of systems designed to do these things. And even if you somehow designed 
elaborate features to handle all of those, or were willing to insist that 
developers should design elaborate subsystems to handle them, there's still the 
cases where you're just flat-out generating large chunks of text to show to 
human beings.

Multiline string literals are a basic tool with vast and diverse uses. Even if 
some individual use case might be better addressed by a bespoke feature, it is 
well worth it to build a tool so simple, versatile, and easy to add.

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to