[swift-dev] Anonymous closure arguments vs varargs

Tino Heth 2th at gmx.de
Thu Jan 5 03:05:21 CST 2017

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
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...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170105/6848bb66/attachment.html>

More information about the swift-dev mailing list