<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">On the key statement of the proposal:<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><p class="" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">Like other build configurations,&nbsp;<code class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">#if swift</code>&nbsp;isn't line-based - it encloses whole statements or declarations. However, unlike the others, the compiler won't parse inactive branches guarded by&nbsp;<code class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">#if swift</code>&nbsp;or emit lex diagnostics, so syntactic differences for other Swift versions can be in the same file.</p></blockquote></div><div class="">I wonder if some structural check should be done nonetheless, like proper balancing of curly braces, and of comment marker (/**/). Neither of these can be overridden (afaik), and their pairing is unlikely to ever change.</div><div class=""><br class=""></div><div class="">The current #if syntax does prevent you from doing what I consider a bad habit that I have seen way too often in C.</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42);">#if<span class="" style="color: rgb(0, 0, 0);">&nbsp;</span>os<span class="" style="color: rgb(0, 0, 0);">(</span>Linux<span class="" style="color: rgb(0, 0, 0);">)</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">&nbsp;&nbsp;<span class="" style="color: rgb(187, 44, 162);">if</span>&nbsp;(boolCheck()) {</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42);">#else</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(49, 89, 93);"><span class="" style="color: rgb(0, 0, 0);">&nbsp;&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">if</span><span class="" style="color: rgb(0, 0, 0);">&nbsp;(</span>optionalBoolCheck<span class="" style="color: rgb(0, 0, 0);">() ??&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">false</span><span class="" style="color: rgb(0, 0, 0);">) {</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42);">#endif</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);"><span class="" style="color: rgb(0, 0, 0);">&nbsp; &nbsp;&nbsp;</span>/* Some code */</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">&nbsp; }</div></div><div class=""><br class=""></div><div class="">Main reason why &nbsp;I hate these unbalanced curly brace, is that it messes up with simple tool like the % to jump to matching brace in vi.</div><div class=""><br class=""></div><div class="">Some may suggest that this fall in the coding style/lint bucket, but I have a feeling that such structural check coud help the parser.</div><div class=""><br class=""></div><div class="">Dany</div></div><br class=""><div><blockquote type="cite" class=""><div class="">Le 12 janv. 2016 à 13:28, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift community,<br class=""><br class="">The review of SE-0020 "Swift Language Version Build Configuration” begins now and runs through January 17th. The proposal is available here:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0020-if-swift-version.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0020-if-swift-version.md</a></div><div class=""><br class="">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class="">or, if you would like to keep your feedback private, directly to the review manager.<br class=""><br class="">What goes into a review?<br class=""><br class="">The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>* What is your evaluation of the proposal?<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>* Is the problem being addressed significant enough to warrant a change to Swift?<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>* Does this proposal fit well with the feel and direction of Swift?<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br class=""><br class="">More information about the Swift evolution process is available at<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://github.com/apple/swift-evolution/blob/master/process.md" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a><br class=""><br class="">Thank you,<br class="">Doug Gregor<br class="">Review Manager</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=TWMs2ohk0-2BcrwF6GNUK35QNQ48G65bEqXMjRx145i-2BK-2BPWNnvNqhdRKf5maRlVT0yacy4BX-2BpfdrWvQVqjZikd9AdOqpTB3CnVAI9n-2FHNKDkY69WHAmv3-2BC0jF9147aCntcvHJVY5aFlpwdHyCMhfr-2F1zgIzHA6XA-2FVn010HGAC4vdRJEV3R7Y9mhv4q2PPwxRKybfzZNCqKSnW40W8UWXIoQD2DHUtdil2y6rEO-2FQs-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="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>