<div dir="ltr">To me, no space to the left makes more sense. It <span style="font-size:13px">conveys a sense of belonging that is similar to variable declarations.</span><div><span style="font-size:13px"><br></span></div><div>extension Deck: Equatable indicates that the Deck class is Equatable in the same way var a: Int indicates that a is Int...<span style="font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 12:30 AM, Kostiantyn Koval <span dir="ltr"><<a href="mailto:konstantin.koval1@gmail.com" target="_blank">konstantin.koval1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>This is code from <a href="https://github.com/apple/swift-package-manager" target="_blank">https://github.com/apple/swift-package-manager</a></div><div>public enum Error: ErrorType {</div><div><div>}</div><div><br>extension Package : Equatable { </div><div>}</div><div><br></div><div><div>I see that in most palaces Apple prefer not having the space on the left side. </div><div>But it wan't sure if it's ok to make a PR for that :)</div><br><br><div><div>Best Regards,</div><div>Kostiantyn</div></div></div></div><div><div class="h5"><div>
<div><div><br></div></div></div><div><blockquote type="cite"><div>On 05 Dec 2015, at 19:48, Stephen Celis <<a href="mailto:stephen.celis@gmail.com" target="_blank">stephen.celis@gmail.com</a>> wrote:</div><br><div><div style="word-wrap:break-word">I believe Apple style prefers no space to the left:<div><br></div><div><a href="https://twitter.com/_jackhl/status/646723367576276992" target="_blank">https://twitter.com/_jackhl/status/646723367576276992</a></div><div><br></div><div>Stephen</div><div><br></div><div><blockquote type="cite"><div>On Dec 5, 2015, at 1:43 PM, Paul Schifferer <<a href="mailto:paul@schifferers.net" target="_blank">paul@schifferers.net</a>> wrote:</div><br><div><div style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><div style="margin:0px">My personal preference is to put a space on both sides of the colon when it’s used for declaration or extension:</div><div style="margin:0px"><br></div><div style="margin:0px">class SomeClass : SomeProtocol {</div><div style="margin:0px"><div style="margin:0px"> var name : String</div></div><div style="margin:0px">}</div><div style="margin:0px"><br></div><div style="margin:0px">and a space only after it’s used for providing a value (as in a function parameter):</div><div style="margin:0px"><br></div><div style="margin:0px">object.callSomething(value: v)</div><div><div style="font-family:helvetica,arial"><br></div><div style="font-family:helvetica,arial">-- <br></div><div style="font-family:helvetica,arial">Paul</div></div></div><div style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="font-family:helvetica,arial;font-size:13px"><br></div></div><p style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On December 5, 2015 at 10:24:40, Kostiantyn Koval (<a href="mailto:konstantin.koval1@gmail.com" target="_blank">konstantin.koval1@gmail.com</a>) wrote:</p><blockquote type="cite" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><div></div><div>Hi Swift team,<span> </span><br><br>Is there a perfect style for ":" when declaring a Type?<br>I have seen 2 styles in Swift source code.<br><br>extension Deck : Equatable<br>extension Deck: Equatable<span> </span><br><br>Is there any guideline for it or both are acceptable?<br><br>Best Regards,<br>Kostiantyn<br>_______________________________________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br></div></div></span></blockquote><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=5xu02FVv-2BCbxTLHpBsC0RVeXVC5uCln3pUIIeLTlIi2vv7lmxdz8xtWgA9K7eWDNP6IaCUAc1QmE8Hmcs4lpHfRlG7NZIIPsLRipQml3uljEOrAdE3ZKDdlYJX1Pk0moXvKhxoABwxjOlJg6UVX5aV3MEBDq8Vt-2F9d45YfUZ-2Fyme9244iuzT9DQPeNNrpfUzu2wzSrpkhHX7GqeQ5ez-2FK9sI7exOUiiz3hPSQ-2BC9aqg-3D" alt="" width="1" height="1" border="0" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"><span> </span>_______________________________________________</span><br style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-users mailing list</span><br style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-users@swift.org" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-users@swift.org</a><br style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-users" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a></div></blockquote></div><br></div></div></blockquote></div><br>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=-2ByAk-2F7E-2FiEEGTs1FrlcDxdE6xHy0RVS34uokvNmIAbaWcOlK8zmYqhoCWgaQOCa0pWDT8uOPdjnIUsMpBCyi9DiFgoJArHvwPGg-2B-2FGXyK7BiIRZznH86yF6dYiU7HYmuzgaZ1wlRWMGXmfBdiO7kVlg23KdaqL6VvugYJEKiAmiyt92tZljT71DT06s5uULirDL0Ss6C1Bw6xJIgSiNLkU-2Bv6at71dDEm-2FgHUC-2BTlLg-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</div></div></div>
<br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Warm regards<br>Roshan<br></div>
</div>