<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Apr 2016, at 00:14, Justin Jia via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div></blockquote><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="">variadic functions are really easy to understand.&nbsp;</div><div class=""><br class=""></div><div class="">For example:</div><div class=""><br class=""></div><div class="">sum(x)</div><div class="">average(x)</div><div class="">NSLog("%d", x)</div><div class="">NSString.stringWithFormat("%d", x)</div></div></div></blockquote><br class=""></div><div>I think the question really is whether not having to add square brackets is really enough to justify a whole language feature? Basically you’ve got two ways you could do this:</div><div><br class=""></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>NSString.stringWithFormat(“%d”, x)</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>NSString.stringWithFormat(“%d”, [x])</font></div><div><br class=""></div><div>The second format is a tiny bit longer, but more explicit at the call-site about what is going on, whereas the first, if you don’t know the function, is indistinguishable from a function that takes a single argument of whatever type x is.</div><div><br class=""></div><div>I’m kind of in the remove variadic functions camp as a result, as I’d prefer to be more explicit about the type rather than less, and it’s not as if two square brackets is going to kill anyone. The main issue for me is whether there are ways for variadic functions to be optimised that aren’t available to a full-blown array? I don’t know enough about the compiler side to comment on that, but it seems like maybe there could be an optimisation for variadic argument lists.</div><div><br class=""></div><div>The other question is how would we implement ArrayLiteralConvertible (and DictionaryLiteralConvertible) without variadic functions? As if the aim is to instantiate an array alternative without having to have a full array instance first then variadic functions may be able to allow this? Again I’m not certain on that point.</div></body></html>