<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">Hi all,</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">I have come up an improvement point about Optional Chain Assignment</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">1. Optional Chain Assignment not working with tuple assignment</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">optional chain assignment only work for directly assignment, not working with tuple assignment.</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162); background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162); background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">For example:</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162); background-color: rgb(255, 255, 255);" class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="color: rgb(186, 45, 162); font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class=""><span style="color: #ba2da2" class="">struct</span> ListNode {</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class=""> <span style="color: #ba2da2" class="">var</span> next: <span style="color: #4f8187" class="">ListNode</span>?</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">}</div><div style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class=""><span style="color: #ba2da2" class="">var</span> previous: <span style="color: #4f8187" class="">ListNode</span>?</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="color: #ba2da2" class="">var</span><span style="color: #000000" class=""> current: </span>ListNode<span style="color: #000000" class="">? = </span>ListNode<span style="color: #000000" class="">()</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="color: #000000" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="color: #000000" class="">//original version</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="color: #000000" class="">let temp = </span>current?.next</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class="">current<span style="color: rgb(0, 0, 0);" class="">?.next = </span>previous</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class="">previous = current</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class="">current = temp</div><div style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; min-height: 14px;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class=""><div style="color: rgb(0, 0, 0); margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">// tuple assignment version (currently compiler error)</div></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="color: #000000" class="">(</span>current<span style="color: #000000" class="">?.next, </span>previous<span style="color: #000000" class="">, </span>current<span style="color: #000000" class="">) = (</span>previous<span style="color: #000000" class="">, </span>current<span style="color: #000000" class="">, </span>current<span style="color: #000000" class="">?.next)</span></div><div class=""><br class=""></div></div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><b class="">error: cannot assign to immutable expression of type '_?'</b></div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">(current?.next, previous, current) = (previous, current, current?.next)</b></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class=""> ~~~~~~~~~~~~~ ^</b></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class=""><br class=""></b></span></div></div></div></div></blockquote><div class="">Should we improve this situation?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div></body></html>