[swift-evolution] When to use argument labels, part DEUX

Gwendal Roué gwendal.roue at gmail.com
Thu Feb 11 08:32:07 CST 2016

> Le 11 févr. 2016 à 15:06, Radosław Pietruszewski <radexpl at gmail.com> a écrit :
> Besides — this seems like an edge case anyway. I very rarely see invocations long enough to be compelled to split it into multiple lines, and even if I would, I’d do it like this:
> 	attachmentFor(image: …,
> 				extraParam: ….)

This goes against Xcode automatic indentation: it will blow your example code into a white space chaos.

But maybe you are using other tools. With Xcode, a serious tool that deserves consideration as much as critics, the only pragmatic way to invoke a function using several lines is the following:

	    image: …,
	    extraParam: ….)

Oh, and this is not an edge case. Just look at UIView animation methods.


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

More information about the swift-evolution mailing list