<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="">On May 6, 2016, at 4:09 AM, Ian Partridge via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><div class="">Currently, the syntax for explicitly naming property setters is:</div><div class=""><br class=""></div><div class=""><span style="font-family: monospace, monospace;" class="">&nbsp; &nbsp; set(newPerimeter) { // declares newPerimeter parameter, "let" not allowed</span></div><div class=""><font face="monospace, monospace" class="">&nbsp; &nbsp; &nbsp; sideLength = newPerimeter / 4.0</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; &nbsp; }</font></div><div class="">Compare this with how extraction of associated values from enumerations looks:</div><div class=""><br class=""></div><div class=""><span style="font-family: monospace, monospace;" class="">switch response {</span></div><div class=""><font face="monospace, monospace" class="">case .Failure(let reason): // let is required here</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; print(reason)</font></div><div class=""><font face="monospace, monospace" class="">case .Result(let code):</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; print(code)</font></div><div class=""><font face="monospace, monospace" class="">}</font></div></div></div></blockquote><br class=""></div><div>I understand what you’re saying, and this would be a logical direction for ML or Haskell, which use patterns for their parameter grammars. &nbsp;In Swift, function parameters (including setter parameters, subscript indexes, etc) do not allow the general pattern matching or destructuring grammar that you can use in ‘case’ patterns, and thus you don’t have to write:</div><div><br class=""></div><div>func f(let x : Int) {}</div><div><br class=""></div><div>This is one of the reasons that led to&nbsp;SE-0003.</div><div><br class=""></div><div>-Chris</div><div><br class=""></div></body></html>