<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Ok, which differences?<br><br><div id="AppleMailSignature"><div>-Chris</div></div><div><br>On Nov 11, 2017, at 2:19 PM, Matthew Johnson via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><br><br><div id="AppleMailSignature">Sent from my iPad</div><div><br>On Nov 11, 2017, at 11:40 AM, Chris Lattner <<a href="mailto:sabre@nondot.org">sabre@nondot.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8">On Nov 10, 2017, at 6:10 PM, Matthew Johnson via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><div><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 10, 2017, at 11:25 AM, Matthew Johnson 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=""><div class="Singleton" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">People have reasonably asked for the ability to make their own function-like types in the past, such that "myvalue(...)" behaves like sugar for "myvalue.call(...)" or something like that. In most cases, they still want to have type system control over what arguments and results their call operation produces. They don't really get that with this proposal; they lose all control over the arity and argument types.<span class="Apple-converted-space"> </span></div></div></blockquote><div class=""><br class=""></div><div class="">As I mentioned, this is directly addressed in the writeup. Here’s the link:</div><div class=""><a href="https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d#staticly-checking-for-exact-signatures" class="">https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d#staticly-checking-for-exact-signatures</a></div></div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">That discusses why you didn’t include it in the present proposal but I think it’s reasonable to oppose adding a dynamic callable feature prior to a more Swifty static callable.</div></div></div></div></blockquote><br class=""></div><div class="">Why? One does not preclude the other.</div></div></blockquote><div class=""><br class=""></div>For exactly the reason Joe articulates. Some people will use what the language offers to get the syntax they desire even if it sacrifices type safety. If we’re going to have first-class callable types in Swift (I think it’s a great idea) type safety for native code should be prioritized over syntactic convenience for dynamic language interop. We can have both, but the former should come first IMO.</div></div></blockquote><br class=""></div><div>Hi Matthew,</div><div><br class=""></div><div>In point of fact, Swift already has the feature you are referring to. It just spells it with square brackets instead of parentheses. A simple change to the punctuation character has much less point than the proposal that I’m pitching.</div></div></blockquote><div><br></div><div>This is true if you squint, but I imagine a design for callable types would include some </div><div> differences other than just punctuation.</div><br><blockquote type="cite"><div><div><br class=""></div><div>-Chris</div><div><br class=""></div><br class=""></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>