<div dir="ltr"><div><span style="font-size:13px"><i>Unlike C++'s templates, a Swift's generic function is semantically a single function.</i></span><br></div><div><br></div>Anton, could you provide further insight on this?<div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, 2 Dec 2016 at 01:03 Anton Zhilin via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">I disagree with the suggestion. Unlike C++'s templates, a Swift's generic function is semantically a single function. One can say that together with a metatype parameter, we pass in witness table.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">What I think we should do is make metatypes easier to use. <i class="gmail_msg">Adrian and I have a PR</i> that has already been waiting for almost a month: <a href="https://github.com/apple/swift-evolution/pull/553" class="gmail_msg" target="_blank">https://github.com/apple/swift-evolution/pull/553</a></div><div class="gmail_msg">Plus, removal of .self could simplify such calls.</div></div>
_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div></div></div>