<div dir="ltr">While reading the summary of a newsletter&#39;s notification about the acceptance of SE-0021&#39;s new syntax, a thought occurred to me:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(69,69,71);white-space:pre-wrap">let fn = someView.insertSubview(_:at:)<br></span><code>let fn1 = someView.insertSubview(_:aboveSubview:)<br></code><code>let fn2 = someView.insertSubview(_:belowSubview:)</code></blockquote><div><br></div><div>That code will create variables fn, fn1, fn2 of the correct type to hold each of the named functions.<br><br>As I understand it, the following things are true:<br><br>1. Member functions on instances of a class type are curried functions that strongly capture &#39;self&#39;.</div><div>2. Any strong reference to those member functions will also prevent that instance from ever reaching ref count 0.</div><div>3. This isn&#39;t a new problem, just one that will become more important now that this use case is easier to... use.<br><br>The easy fix for this situation would be to declare fn, fn1, and fn2 as weakened optionals so they don&#39;t keep someView around if it should have been dallocated. The question is... how? Is there existing syntax that means &quot;infer the type from the right-hand-side production, except as an optional / weakened optional&quot;?</div><div><br></div><div>Mike</div></div>