[swift-evolution] [Idea] Trailing Multi-Line String Literal

David Hart davidhart at fastmail.com
Thu Jun 15 06:05:39 CDT 2017


Personally, I have never felt that need.

Trailing closures fill of need of making Swift a good candidate for building DSLs, where they make the function calls look more like first-class operations. But I don’t think that trailing strings would be as useful.

David.

> On 15 Jun 2017, at 11:54, Gor Gyolchanyan via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Good day, swift evolution community!
> 
> I'll just get right to it...
> 
> Did anyone else beside me wished this was a thing?
> 
> func parse(allowSomeBehavior: Bool = true, source: String) {
> 	// ...
> }
> 
> parse(allowSomeBehavior: false) """
> 	This is a source string
> 	that contains a number of lines of text
> 	which is passed to the function `parse`
> 	"""
> 
> parse """
> 	The exact same thing as above
> 	except no other parameters are specified
> 	"""
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list