<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPhat 6</div><div><br>On 5 Dec 2015, at 19:23, Adrian Kashivskyy &lt;<a href="mailto:adrian.kashivskyy@me.com">adrian.kashivskyy@me.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><blockquote type="cite" class=""><div dir="auto" class=""><div class="">SwiftLint looks really nice, but one thing I'd really like is automatic formatting.</div></div></blockquote><div class=""><br class=""></div>That's a feature of IDE, not the language itself.</div></blockquote><div><br></div>Not necessarily. The existence of "go fmt" has resulted in teams running it as a pre-commit translation and as a way of standardising across all users, regardless of IDEs. Otherwise you end up with multiple IDEs (like Eclipse and IntelliJ) which do formatting slightly differently and lead to all manner of pointless arguments.&nbsp;<div><br></div><div>Letting "the IDE" do formatting is fine provided there is a maximum of one IDE.&nbsp;</div><div><br></div><div>Alex<br><div><br><blockquote type="cite"><div><div class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font color="#929292" class="">Pozdrawiam – Regards,</font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font color="#929292" class="">Adrian Kashivskyy</font></div>
</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">Wiadomość napisana przez Harlan Haskins &lt;<a href="mailto:harlan@harlanhaskins.com" class="">harlan@harlanhaskins.com</a>&gt; w dniu 05.12.2015, o godz. 17:52:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">SwiftLint looks really nice, but one thing I'd really like is automatic formatting. I'd absolutely like to see clang-format adapted with Swift support. Maybe the SwiftLint people can, now that Swift is open source, contribute the bulk of the SwiftLint project directly into clang-format.</div><div class=""><br class="">On Dec 5, 2015, at 9:09 AM, Paul Young &lt;<a href="mailto:paulyoungonline@gmail.com" class="">paulyoungonline@gmail.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">
<span id="mailbox-conversation" class=""><div class="">Amir, you may be interested in SwiftLint:&nbsp;<a href="https://github.com/realm/SwiftLint" class="">https://github.com/realm/SwiftLint</a></div></span><div class="mailbox_signature"><br class=""></div>
<br class=""><br class=""><div class="gmail_quote"><p class=""></p>On Sat, Dec 5, 2015 at 1:43 PM, Amir Michail <span dir="ltr" class="">&lt;<a href="mailto:amichail@gmail.com" target="_blank" class="">amichail@gmail.com</a>&gt;</span> wrote:<br class=""><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class=""><div class="">
<blockquote type="cite" class="">
<div class="">On Dec 5, 2015, at 8:14 AM, Austin Zheng &lt;<a href="mailto:austinzheng@gmail.com" class="">austinzheng@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Rather than having the compiler attempt to enforce (subjective, constantly evolving) best practices, maybe we should think about ways to make it easier for people to write their own linters that can integrate well with the rest of the toolchain.</span></div>
</blockquote>
<div class=""><br class=""></div>
<div class="">All programming languages are already enforcing subjective views about best practice in one form or another.</div>
<br class=""><blockquote type="cite" class=""><div class="">
<div class="" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div>
<div class="" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Austin</div>
<div class="" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class=""><div class=""><blockquote type="cite" class="">
<div class="">On Dec 5, 2015, at 5:02 AM, Amir Michail &lt;<a href="mailto:amichail@gmail.com" class="">amichail@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class="">
<div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">The problem is that solo developers rarely have the self-discipline to avoid obviously bad code style.</div>
<br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="">
<div class="">On Dec 5, 2015, at 5:15 AM, Adrian Kashivskyy &lt;<a href="mailto:adrian.kashivskyy@me.com" class="">adrian.kashivskyy@me.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I'm -1 on that – compiler should guarantee the program correctness, not style correctness.<div class=""><br class=""></div>
<div class="">
<blockquote type="cite" class="">Perhaps you could specify a programming style at the top of each file (e.g., OOP, functional, hybrid, etc.)</blockquote>
<div class=""><br class=""></div>I almost immediately thought of whole projects where people would put `@style(hybrid)` at the top to get rid of troublesome compiler warnings, or put the "style exception" annotation for the whole file. This would become "public static void main" of Swift.</div>
<div class=""><br class=""></div>
<div class="">
<blockquote type="cite" class="">For example, a long method could trigger an error along with suggestions for refactorings to fix this “bad smell”.<br class=""></blockquote>
<br class=""></div>
<div class="">My greatest concern is about who will define what "bad smell" and individual styles look like. Coding style is a very subjective matter, and should not be enforced by compiler or any manifest (that's why I'm against strict code style guides as well).</div>
<div class=""><br class=""></div>
<div class="">Besides, enforcing one style per source file would loose one of the best features of Swift – diversity. Swift is a multi-paradigm language, influenced by the best features of many other modern languages. It is imperative, functional, object-oriented and protocol-oriented at the same time. We'd loose that variety.</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class="">
<div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Regards,</div>
<div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Adrian Kashivskyy</div>
<div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">iOS Developer at Netguru</div>
</div>
<br class=""><div class=""><blockquote type="cite" class="">
<div class="">Wiadomość napisana przez Amir Michail &lt;<a href="mailto:amichail@gmail.com" class="">amichail@gmail.com</a>&gt; w dniu 05.12.2015, o godz. 00:53:</div>
<br class="Apple-interchange-newline"><div class=""><div class="">Perhaps you could specify a programming style at the top of each file (e.g., OOP, functional, hybrid, etc.) and code that doesn’t match that style would result in a compiler error.<br class=""><br class="">For example, a long method could trigger an error along with suggestions for refactorings to fix this “bad smell”.<br class=""><br class="">If you don’t want to fix the problem, you could use a style exception construct to surround the code in question and it would get rid of the compile error.<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div>
</blockquote></div>
<br class=""></div></div>
</blockquote></div>
<br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=7XtDdMHRjqIUi4tzSjSp2pWQIyxYdP6woIWn4vwV5gcDrpERuyFtHdInpRU3Hjs3XII77lyhZvTj5Cwqe5zPAXuSDa9o7cB-2FfDbg-2FwZU8phGQUVaNXXC3Oxbxfe099gGWCQ9CQlCknudAfhjJ55r8VH0A1Iel3zveOSjE-2BnBQRJnrkDj6oTo2RAjLMVmh8KqERyY3WyI1gR00rrVPPeN1C9TkmPexmanmA50gemE0fM-3D" alt="" width="1" height="1" border="0" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;"><span class="Apple-converted-space">&nbsp;</span></span><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">swift-evolution mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:swift-evolution@swift.org" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">swift-evolution@swift.org</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.swift.org/mailman/listinfo/swift-evolution</a>
</div>
</blockquote></div>
<br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=2B7F2l-2FSnuN-2Bu5iv-2FwIMsffhJH-2F7mw5PnNN35hfDpySOjtdrA-2BZkcCzg0FOpeIiVzASky9utb2JHAlWqzN9brqRMpsi8yiExzHH0CKF5poxM1K0ZJLVyzN6zIIAROtRsF8HXTVETF6JVCOiO1nfESyw-2FxrjgFGGJz5tJCfjy-2FgDbMslfznvnpTvrqCkHAEXtc8PR7JUK1XAUo8xMKIP5MKfyFipv98bVZMgmaDTSAKw-3D" alt="" width="1" height="1" border="0" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-evolution mailing list</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:swift-evolution@swift.org" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-evolution@swift.org</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>
</div></blockquote>
</div>
<br class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=9quTCwvcagxGmkGTuvea4A75cqjTWnZHWOWIhXyy9WUgwEhALsHOduLIhFpKfZ-2FN-2BhwL6VG-2FkUmHXiHC23T6nYSUHx26f3NIx-2Fqkh7KF4LFmIscZ17mlnZW0ExwxUZuKFRaAjf6OME2z4YwM9IB7uF-2BjDnx3F0zM0FPyyHVtDD8OCcGHGFtNqS4AYb-2FelDihN4blmzYvvG6Na-2FpKbEgEMARX1Uma0X1YB2f5LCBBVE0-3D" alt="" width="1" height="1" border="0" style="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;" class=""></div></blockquote></div><br class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=z0Ft8gvIaLt1zLwfkl4og6osLD9N8tlWJY1PY2zqWLUQ7lw7z0v3RH6BoGcT7nVGKA1m7FlW2kmQH1YQ7yLXtkjuy4i0JPYDjkll0Ood6bqiZUXt3emuozJen1X5eF-2FTeaWyFbyRVcKHZqO6iigvAUqmqvVJeY02qd-2BXYDc3LuT-2F0HEkrizzpVMH2aMGyRusRMZpaKMI7XfMqVZzhSEBJTgL8QRUIdQcyAkV4tUw5dw-3D" alt="" width="1" height="1" border="0" style="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;" class="">
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=Q0Y0L54uOhrrHtFzGFlMmzHCkni7p1uaN05dut7Y5S64-2BHNO-2BRBOdq4bEMUbF74Y9lfEFetZ3AjUoGExdORAtFmw8mlyVjudY0vzaWSJcqumqatmRjj3n5g3Qr8ohHepw5L5obyzUFNEdt1VrRtzNfzJua-2F9j8KojXFT0MCYSQE9tJgIJY1gr0lDoDHwxzgd-2FZviaZmAicGeucqWFH8dPPkSRLGC9QLugDziGl3B9l8-3D" alt="" width="1" height="1" border="0" style="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;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=4UsVFgIJDmjEl1-2Bp4dkDdfPyHFijFe3gbZsM1qGcraVKHc9XxAm3jOCI3DgOlkePRB1sZ-2Fjt0ZsVh7U3-2FIh-2FIFZVUq4eE46tBdEwRvZDaBLW-2FsGn0a-2B3bkrBuZdunUDbu7SH-2BwObpabOKgZ7U-2F03czr293ouCmYF-2FXBT46ZZMYCnd3qrmkaB3thZZF1rxGmUzweWZaGeUJDiIJjKbw1w7q4O8y4z29CnwXR19LXcTaw-3D" alt="" width="1" height="1" border="0" style="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></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></div></body></html>