<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="">Hello,<div class=""><br class=""></div><div class="">I use this feature to make generic "weak target actions" like this :</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">func weakTarget<T, S: AnyObject>(target: S, action: S -> (T -> Void)) -> (T -> Void) {<br class=""> return { [weak target] (input: T) -> Void in<br class=""> guard let target = target else { return }<br class=""> return action(target)(input)<br class=""> }<br class="">}<br class=""><br class="">class Target {</font></div><div class=""><span style="font-family: Menlo;" class=""> init() {}</span></div><div class=""><font face="Menlo" class=""> func printHello(firstName: String, lastName: String) {<br class=""> print("Hello \(firstName) \(lastName) !")<br class=""> }<br class="">}<br class=""><br class="">class Receiver {<br class=""></font><div class=""><span style="font-family: Menlo;" class=""> init() {}</span></div><font face="Menlo" class=""> var printSomething: ((String, String) -> Void)? = nil<br class="">}<br class=""><br class="">var aTarget: Target? = Target()<br class="">let aReceiver = Receiver()<br class=""><br class="">aReceiver.printSomething = weakTarget(aTarget!, action: Target.sayHello)<br class=""><br class="">aReceiver.</font><span style="font-family: Menlo;" class="">printSomething</span><font face="Menlo" class="">?("Jérôme", "Alves") // => "Hello Jérôme Alves !"<br class=""><br class="">a = nil</font></div><div class=""><font face="Menlo" class=""><br class="">aReceiver.printSomething?("Jérôme", "Alves") // => aReceiver.printSomething still has a value, but it does nothing<br class=""><br class=""></font></div><div class=""><br class=""></div><div class="">As you can see, if you call weakFunc() with a func which has multiple arguments, the T generic will be a tuple and I guess this is thanks to this "implicit tuple splat" feature but I'm not sure.</div><div class="">So can someone enlighten me ? Will this code continue to work if this proposal is approved ?</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 5 févr. 2016 à 19:12, Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift community,<br class=""><br class="">The review of “Remove implicit tuple splat behavior from function applications” begins now and runs through February 9, 2016. The proposal is available here:<br class=""><br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0029-remove-implicit-tuple-splat.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0029-remove-implicit-tuple-splat.md</a></blockquote><div class=""><br class="">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote><div class=""><br class="">or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:<br class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">Proposal link:</div><div class=""><br class=""></div><div class=""><a href="http://github.com/apple/swift-evolution/blob/master/proposals/0029-remove-implicit-tuple-splat.md" class="">http://github.com/apple/swift-evolution/blob/master/proposals/0029-remove-implicit-tuple-splat.md</a></div><div class=""><br class=""></div><div class="">Reply text</div><div class=""><br class=""></div><div class="">Other replies</div><div class=""><br class=""></div></blockquote><div class=""><b class="">What goes into a review?<br class=""></b><br class="">The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br class=""><br class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• What is your evaluation of the proposal?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Does this proposal fit well with the feel and direction of Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br class=""></div><div class=""><br class=""></div>More information about the Swift evolution process is available at<br class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="https://github.com/apple/swift-evolution/blob/master/process.md" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a></div></blockquote><div class=""><br class="">Thank you,<br class=""><br class="">-Joe<br class="">Review Manager</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>