[swift-evolution] multi-line string literals

Andrey Tarantsov andrey at tarantsov.com
Mon Dec 14 16:37:18 CST 2015


> I don't think it's the language's job to enforce preferences here, especially given that holy wars have been fought over indentation (as well as things much less important)

Actually, as Go shows (and perhaps the Ada's style checking mode a few decades before it), it's precisely the language's job, for exactly that reason. Any bikeshedding that can be avoided, should be. (I'm also enjoying the Standard JavaScript movement of late.)

> Having 3 lines all started by the same number of tabs, but with two having spaces as well for sub-tab-length indentation, should never be an error.

But to be clear, that wouldn't be an error in my proposed rule, which is, again (I wish I knew how to say this in a simpler way):

> you want to issue a syntax error if all non-empty lines don't share a common whitespace prefix that entirely covers at least one of the whitespace prefixes.

A.

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


More information about the swift-evolution mailing list