<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=""><div class="">I agree mostly with what you’re saying, but variadic parameters don’t actually require at least one element. `max` simply returns a non-optional because its function signature has three non-variadic parameters as well:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">public</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> max&lt;T : </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Comparable</span><span style="font-variant-ligatures: no-common-ligatures" class="">&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class=""> x: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class=""> y: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class=""> z: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class=""> rest: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span><span style="font-variant-ligatures: no-common-ligatures" class="">...) -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span></div></div><div class=""><br class=""></div>
&gt; This has been brought up and there was a proposal by Haravikk, but the discussion started almost mid-July and the deadline for all Swift 3 *implementation* was on Jul 27. So it didn't make it, but I think there will be enough discussion about it on Aug 1 and after (all discussion about features for future Swift releases is currently on hold until Aug 1).<br class="">&gt; <br class="">&gt; Unfortunately, the suggested behavior has an issue what to do when the array is empty. For example, you've mentioned min and max - there are (as variadic) ensured to always be called with at least one value. When you use it with an array, there is no guarantee that the array contains any element. In such cases, what should the min/max do? Crash? Return +-infinity?<br class="">&gt; <br class="">&gt; Changing min/max to return an optional would be a solution, but I don't think a good one.<br class="">&gt; <br class="">&gt; Moreover, for this particular example, you already have min/max on arrays:<br class="">&gt; <br class="">&gt; let numbers = [23, 43, 12, 10]<br class="">&gt; numbers.minElement()<br class="">&gt; <br class="">&gt; &gt; On Jul 29, 2016, at 11:46 AM, Alexandre Lopoukhine via swift-evolution&lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;wrote:<br class="">&gt; &gt; <br class="">&gt; &gt; Hello all,<br class="">&gt; &gt; <br class="">&gt; &gt; I'm not sure if this has been brought up before, or what the status of the issue is as of Swift 3, but I was wondering why there is no option to call a function that takes a variadic parameter argument with an array. Seen as the parameter essentially becomes an array, and is used as such in the function, I think that adding the ability to call it with one directly could be useful, with few downsides. This will, for example, allow you to use the built-in `min` and `max` functions on arrays.<br class="">&gt; &gt; <br class="">&gt; &gt; WDYT?<br class="">&gt; &gt; <br class="">&gt; &gt; – Sasha<br class="">&gt; &gt; _______________________________________________<br class="">&gt; &gt; swift-evolution mailing list<br class="">&gt; &gt; <a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">&gt; &gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&gt; <br class="">&gt; <br class="">&gt;<span class="Apple-converted-space">&nbsp;</span>

</body></html>