<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="">Here’s a question that Drew raised as he was educating me on this discussion. Given that the following works, are you proposing to deprecate,<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; color: #bb2ca2" class="">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> a&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> b&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> c&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> d&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>{ } <span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// 1</span></div></div><div class=""><br class=""></div><div class="">in favor of?</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; color: #bb2ca2" class="">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> a&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2;</span>&nbsp;<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> b&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3;</span>&nbsp;<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> c&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4;</span>&nbsp;<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> d&nbsp;= <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>{ } <span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// 2</span></div></div><div class=""><br class=""></div><div class="">If semi-colon is still being considered, can Joe or Jordon clarify?</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 2, 2016, at 7:40 PM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div 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;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Feb 2, 2016, at 5:13 PM, Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</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;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 2, 2016, at 16:53, Ross O'Brien via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: 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;">For example: getting the first element from an array of optionals. Here's my sample trivial example:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: 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="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="white-space: pre;">        </span><span class="" style="color: rgb(187, 44, 162);">var</span><span class="Apple-converted-space">&nbsp;</span>array : [<span class="" style="color: rgb(112, 61, 170);">Int</span>?] = []</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="white-space: pre;">        </span><span class="" style="color: rgb(187, 44, 162);">if</span><span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">let</span><span class="Apple-converted-space">&nbsp;</span>x = array[<span class="" style="color: rgb(39, 42, 216);">0</span>]<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">where</span><span class="Apple-converted-space">&nbsp;</span>array.<span class="" style="color: rgb(112, 61, 170);">count</span><span class="Apple-converted-space">&nbsp;</span>&gt;<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(39, 42, 216);">0</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="white-space: pre;">        </span>{</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="white-space: pre;">                </span><span class="" style="color: rgb(61, 29, 129);">print</span>(x)</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="white-space: pre;">        </span>}</div></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: 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;">This code doesn't work. The array index is out of range. But there's no way I know of to rearrange the 'if' to ensure the array isn't empty before binding to the first element - the developer has to write a nested if statement.</div></div></blockquote><br class=""></div><div class="">We already allow this, with commas:</div><br class=""><blockquote class="" style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class="">var array: [Int?] = []</div><div class="">if !array.isEmpty, let x = array[0] {</div><div class="">&nbsp; print(x)</div><div class="">}</div></blockquote></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;"><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;">That's true, but there are some problematic ambiguities with our current syntax, since 'let' and 'case' conditions both admit multiple sub-conditions also separated by commas, e.g. 'if let x = y, y = z { }' or 'if case let x = y, let y = z'. Using ';' for this purpose would be less ambiguous.</div></div></blockquote></div><br class=""></div></body></html>