<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="">Hm, sorry but I’m still not convinced :(<div class=""><br class=""><div class="">I still find it confusing and I think if it wasn’t in Swift already, it would not be added. Maybe someone can come up with a strong reason why it should be added if it weren’t there.<div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">- Dennis</div></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 18, 2016, at 10:10 AM, Gwendal Roué &lt;<a href="mailto:gwendal.roue@gmail.com" class="">gwendal.roue@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">Le 18 avr. 2016 à 10:02, Dennis Weissmann &lt;<a href="mailto:dennis@dennisweissmann.me" class="">dennis@dennisweissmann.me</a>&gt; a écrit :<br class=""><br class="">That’s IMO already a problematic case:<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>DatabaseTable.select(id, name).order(name, id)<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>// What’s the problem?<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>// vs.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>DatabaseTable.select([id, name]).order([name, id])<span class="Apple-tab-span" style="white-space:pre">        </span>// OK, of course... But some people will find it a litle short<br class=""></blockquote><br class="">The problem is that you can’t tell by looking at the call site whether `select` takes an id and a name as parameter (the function being declared as `func select(id: String, _ name: String)` or a vararg `func select(string: String…)`.<br class="">Both call sites look like this:<br class=""><br class=""><blockquote type="cite" class="">select(id, name)<br class=""></blockquote><br class="">I think it would make the language clearer and more consistent if varargs were removed.<br class=""></blockquote><br class="">Sorry my example wasn’t clear enough, and that’s why you couldn’t tell by looking at the call site what was happening. You were missing context. "id" and "name" are not values, they’re database columns. It’s more something along:<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>DatabaseTable {<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>func select(columns: Column…) { … }<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>people.select(idColumn, nameColumn)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>furniture.select(nameColumn, widthColumn, heightColumn, depthColumn, priceColumn)<br class=""><br class="">(Sometimes examples are too complex, and don't serve well their purpose - my mistake)<br class=""><br class="">Maybe you’ll follow the counter argument now. Which is "of course a variadic function can always be turned into a function that takes an array, what a surprise, but this is not always the good thing to do."<br class=""><br class="">Regards,<br class="">Gwendal Roué</div></div></blockquote></div><br class=""></div></div></div></body></html>