I am not particularly fussed by the spacing, but I do tend to use a space either side for dictionaries and for ?: and for the rest no space before. <span></span><br><br>On Friday, 15 January 2016, David Sweeris via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I use &quot; : &quot; (space on both sides) for everything except type annotations &amp; generic constraints. Didn&#39;t realize I was doing it wrong.<br>
<br>
&gt; On Jan 14, 2016, at 11:35, Kevin Ballard via swift-evolution &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;swift-evolution@swift.org&#39;)">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Dictionary type shorthand syntax is meant to look like a dictionary literal, and dictionary literals are almost universally written with no space before the colon. It makes sense to me for dictionary types to be written the same way, e.g. `[Key: Value]`. Not only does this look more like a dictionary literal, but I&#39;d argue it also reduces confusion. Every other case that I can think of where you find space-colon-space syntax used is when declaring the bounds of a generic type parameter, or declaring the superclass/protocols of a type declaration (which is pretty similar to declaring the bounds). But in the syntax `[Key : Value]`, Value is not a bound on Key.<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;swift-evolution@swift.org&#39;)">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote><br><br>-- <br>  -- Howard.<br><br>