<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 6, 2016 at 11:38 AM Tino Heth via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It&#39;s a late answer… but I wanted to be a good citizen and checked if the topic has been discussed before; so, it seems that is not the case ;-)<br>
<br>
In short, I agree:<br>
Variadic parameters are somewhat cool, and I think I was exited when I&#39;ve seen them in C the first time… but I afair, I never created a variadic function in production code, and I think I just used them for the first time in Swift (I checked wether print is variadic…)<br>
As of today, string interpolation has several advantages over old-style string-formatting, and I can&#39;t remember any other method in one of the established libraries that uses this feature:<br>
Explicitly creating an array is just two additional characters, which doesn&#39;t matter in a long list (which imho shouldn&#39;t be crammed into the function call anyways), and when there are only a few parameters, you can mimic variadics with Optionals defaulted to nil — and who knows what the long-awaited hygienic macros might do to the importance of variadic parameters.<br>
<br>
Additionally, variadic parameters compete with trailing closures, which for me would always win the struggle for the last parameter ;-)<br></blockquote><div><br></div><div>Actually, you don’t have to make a variadic parameter last…print doesn’t.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
As I said, I can&#39;t remember a single use case in Swift — and I already utilized quite a lot of the &quot;strange&quot; techniques (currying, tuple splat, complicated combinations of generics &amp; protocols…).<br>
So for me, the answer to the question &quot;would I add this feature to Swift if it wasn&#39;t there?&quot; is a clear no…<br>
<br>
Tino<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">-Saagar Jha</div></div>