[swift-evolution] History and future of Swift's parentheses
rjmccall at apple.com
Mon Jun 12 14:29:33 CDT 2017
> On Jun 12, 2017, at 3:13 PM, Jens Persson <jens at bitcycle.com> wrote:
> On Mon, Jun 12, 2017 at 8:52 PM, John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>> wrote:
> We really do want to tie most of these features specifically to function calls.
> I'm not sure if I understand what you mean. Do you mean that you really don't want these features to require changes to the type system?
That's correct. There's a lot of special structure to function calls — labels, overloading, default arguments, variadics, inout arguments, (eventually) borrowed arguments — that we do not want to introduce into the first-class tuple system, or at least not in the exact same way. In some cases, like overloading or defaulted and inout arguments, it cannot be done without a major and unwanted model shift. In other cases, like variadics, it could theoretically be done but would complicate the type system in ways we are trying to avoid.
Regardless, the existence of any call-specific structure at all implies that generic value forwarding cannot always be sufficient to do generic argument forwarding. Maybe that's an argument for not having any call-specific structure, but we do have that and it's not going away.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution