<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body 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 Jun 1, 2016, at 9:15 AM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Or, to be honest:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">/// Offers user-facing public assert configuration test</font></div><div class=""><font face="Menlo" class="">@_transparent</font></div><div class=""><font face="Menlo" class="">public</font></div><div class=""><font face="Menlo" class="">func isDebugAssertConfiguration() -&gt; Bool {</font></div><div class=""><font face="Menlo" class="">&nbsp; return _isDebugAssertConfiguration()</font></div><div class=""><font face="Menlo" class="">}</font></div></div><div class=""><br class=""></div><div class="">which covers, I believe, about 98% of the demand for this feature</div><div class=""><br class=""></div><div class="">-- E</div></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">Following up to myself, now that I'm actually using this, I realize that avoiding using a build configuration test might not be the best idea from the developer experience side of things:&nbsp;</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">main.swift:7:9: </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #d53bd3" class=""><b class="">warning: </b></span><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">will never be executed</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; print("Not debug assert configuration")</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; ^</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">main.swift:4:8: note: condition always evaluates to true</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; if isDebugAssertConfiguration() {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&nbsp;&nbsp; &nbsp; &nbsp; ^</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Testing debug assertion</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">Whereas going with if #if debugassert() would simply make code "disappear".</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">-- E</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div></body></html>