[swift-evolution] [Discussion] Design guideline rule for `:`
Adrian Zubarev
adrian.zubarev at devandartist.com
Wed Jun 22 06:40:49 CDT 2016
Should there be a design guideline rule for colons : in Swift?
I see people doing things like this:
protocol A : B {}
// VS.
protocol A: B {}
func foo<T : A>() -> T { … }
// VS.
func foo<T: A>() -> T { … }
var value : Type
// VS.
var value: Type
[key1 : value1, key2 : value2]
// VS.
[key1: value1, key2: value2]
I prefer the second style, where there is no whitespace between lhs and the : symbol and there is also a whitespace after :. Example: something: somethingElse
--
Adrian Zubarev
Sent with Airmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160622/ee7172b3/attachment.html>
More information about the swift-evolution
mailing list