<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 Dec 15, 2015, at 15:20 , Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" style="font-family: Monaco; font-size: 11px; 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=""><br class="Apple-interchange-newline">On Dec 15, 2015, at 3:16 PM, Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class="">Here’s a little annoyance I ran across just now:<br class=""><br class=""> let sub: CKSubscription = {<br class=""> if let ID = self.ID {<br class=""> return CKSubscription(recordType: typeName, predicate: predicate, subscriptionID: ID, options: allMutations)<br class=""> }<br class=""> else {<br class=""> return CKSubscription(recordType: typeName, predicate: predicate, options: allMutations)<br class=""> }<br class=""> }()<br class=""><br class="">This closure obviously never leaves the enclosing function, but Swift doesn’t treat it as if it had been passed to a @noescape function, so I have to say “self.ID” instead of “ID” in the condition. That’s a bit irritating, and I’d like to see it improved.<br class=""></blockquote><br style="font-family: Monaco; font-size: 11px; 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=""><span style="font-family: Monaco; font-size: 11px; 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; float: none; display: inline !important;" class="">Seems reasonable, especially because SILGen peepholes { }() so that it doesn't even allocate a closure to begin with.</span><br style="font-family: Monaco; font-size: 11px; 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=""></div></blockquote></div><br class=""><div class="">+1 from me as well. Personally, I would consider this an enhancement to an existing feature and would therefore not need to have it go through formal review. I don't think I get to make this call, though.</div><div class=""><br class=""></div><div class="">Jordan</div></body></html>