<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="">Wow. I did not see that coming!<div class=""><br class=""></div><div class="">Either way, I agree that Foo.bar works, but then again, so does Enum.value and we give that one a free pass. Beyond "it's not how it works right now", I don't really have any serious argument against the feature. I'd like to have that at some point.<br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Félix</span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Le 27 juin 2016 à 14:07:46, Anton Zhilin 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=""><div class="">Charlie Monroe via swift-evolution <swift-evolution@...> writes:<br class=""><br class=""><blockquote type="cite" class="">This will only get you an array of closures:<br class=""><br class="">let bars = foos.map(Foo.getBar) // [() -> Int, () -> Int, () -> Int]<br class="">bars[0] // () -> Int<br class="">bars[0]() // 1<br class=""></blockquote><br class="">Just checked:<br class=""><br class="">struct A {<br class=""> func a() -> Int { return 0 }<br class="">}<br class="">print(A.a.dynamicType) //=> (A) -> (()) -> Int<br class=""><br class="">Wut?<br class=""><br class="">First of all, (()) -> Int should mean function with one parameter, since <br class="">tuple splat behaviour is going to be removed.<br class=""><br class="">Then, with uncurrying proposal, A.a.dynamicType should be (A) -> Int, <br class="">because both self and other parameters are now passed together.<br class=""><br class="">My guess is that both accepted proposals are still not implemented. Once <br class="">it's done, we will get (A.a)(A()) == 0 and [A(), A()].map(A.a) == [0, 0]<br class=""><br class="">_______________________________________________<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></div></blockquote></div><br class=""></div></body></html>