<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 26, 2016, at 06:57, Антон Жилин 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 dir="ltr" class="">+1<div class=""><br class=""></div><div class="">&gt; Also, technically we can assign a value to Void function<div class="">This proposal will not disallow that. Just non-Void functions will be preferred when result is used.</div><div class=""><pre style="white-space: pre-wrap;" class="">array.sort(..) // mutating
let array2 = array.sort(..) // non-mutating, instead of array.sorted()</pre><pre style="white-space: pre-wrap;" class=""><font face="arial, helvetica, sans-serif" class="">I think, that's actually the best solution to mutating / non-mutating convention!</font></pre></div></div></div></div></blockquote></div><div>There are mutating methods that have return values, like Dictionary.removeValue(forKey:). Admittedly there’s no non-mutating version of that at the moment, but that doesn’t mean there couldn’t be.</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>