<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>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><br>On Dec 5, 2015, at 9:09 AM, Paul Young &lt;<a href="mailto:paulyoungonline@gmail.com">paulyoungonline@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div>
<span id="mailbox-conversation"><div>Amir, you may be interested in SwiftLint:&nbsp;<a href="https://github.com/realm/SwiftLint">https://github.com/realm/SwiftLint</a></div></span><div class="mailbox_signature"><br></div>
<br><br><div class="gmail_quote"><p>On Sat, Dec 5, 2015 at 1:43 PM, Amir Michail <span dir="ltr">&lt;<a href="mailto:amichail@gmail.com" target="_blank">amichail@gmail.com</a>&gt;</span> wrote:<br></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>
<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><br class=""></div>
<div>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;"></div></blockquote></div><br><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;">
</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></body></html>