[swift-dev] Anonymous closure arguments vs varargs
spestov at apple.com
Thu Jan 5 14:54:21 CST 2017
> On Jan 5, 2017, at 1:05 AM, Tino Heth <2th at gmx.de> wrote:
> Hi there,
>> I think it would be better if we permitted an implicit conversion between (T…) -> () and ([T]) -> ()
> There has been a proposal to replace the "…" with a "variadic"-annotation (on arrays, or even on all types that can be expressed as arrays): https://github.com/Haravikk/swift-evolution/blob/a13dc03d6a8c76b25a30710d70cbadc1eb31b3cd/proposals/nnnn-variadics-as-attribute.md <https://github.com/Haravikk/swift-evolution/blob/a13dc03d6a8c76b25a30710d70cbadc1eb31b3cd/proposals/nnnn-variadics-as-attribute.md>
This sounds like a cosmetic proposal that doesn’t change semantics, so I don’t think it’s directly related to the change I’m proposing.
> The idea to accept array literals wherever a set, array etc. is expected came up in the discussion as well.
> Interoperability with C has not been part of the debate, but besides that, imho it should be possible to get rid of varargs completely.
> Imho the whole thread didn't receive the treatment it deserved because it happened in a very busy timeframe, but I wanted to asked the original author if he wants to continue working on the idea.
> Afaics, the issue you found would be directly affected by the change in question, so I'm curious about your opinion on it.
> Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-dev