<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 14, 2017 at 5:50 PM, Amir Michail <span dir="ltr"><<a href="mailto:a.michail@me.com" target="_blank">a.michail@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class="gmail-"><blockquote type="cite"><div>On Jan 14, 2017, at 6:46 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:</div><br class="gmail-m_5581296995374281999Apple-interchange-newline"><div><div dir="ltr">On Sat, Jan 14, 2017 at 5:35 PM, Amir Michail <span dir="ltr"><<a href="mailto:a.michail@me.com" target="_blank">a.michail@me.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span><br>
> On Jan 14, 2017, at 6:28 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:<br>
><br>
> This has been brought up on this list before. The conclusion of the previous thread on this topic was that there is a way to do this:<br>
><br>
> #if false<br>
> // put your code here<br>
> #endif<br>
><br>
<br>
</span>This would not check the code for compilability within the surrounding code. This requires more than a syntax check.</blockquote><div><br></div><div>I can't say I've ever needed that feature; could you share a concrete use case?</div><div><br></div></div></div></div></div></blockquote><div><br></div></span><div>Consider an array of levels for a game where some levels are commented out for possible future use. It would be nice to have such level entries continue to compile as the code elsewhere evolves and yet not be included in the executable.</div></div></div></blockquote><div><br></div><div>```</div><div><div>enum Levels: Int {</div><div> case foo = 1, bar, baz, boo</div><div>}</div><div><br></div></div><div><div>var levels: [Levels] = [</div><div> .foo,</div><div> .bar,</div><div>]</div><div><br></div><div>// disabled</div><div>_ = {</div><div> levels += [</div><div> .baz,</div><div> .boo,</div><div> // this won't compile if you add:</div><div> // .nonExistent,</div><div> ]</div><div>}</div></div><div>```</div><div><br></div></div><br></div></div>