<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hmm, a VariadicArray&lt;T&gt; sounds like an interesting solution, however, it would break existing implementation. I’m trying to avoid having to do that.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I think the previously discussed solutions, and/or your proposal for strict-typing (e.g., disallowing Any), are steps in the right direction, as they introduce new functionality without breaking existing implementations.&nbsp;</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Just my 0.02.</div> <br> <div id="bloop_sign_1449949789503094784" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px"><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif;">Best,</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif;"><br></div><font color="#222222" face="arial, sans-serif" style="color: rgb(34, 34, 34); font-family: arial, sans-serif;">Arthur /&nbsp;<a href="http://sabintsev.com">Sabintsev.com</a></font></div></div> <br><p class="airmail_on">On December 12, 2015 at 2:39:26 PM, David Waite (<a href="mailto:david@alkaline-solutions.com">david@alkaline-solutions.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<br>&gt; On Dec 12, 2015, at 12:12 AM, Arthur Ariel Sabintsev via swift-evolution &lt;swift-evolution@swift.org&gt; wrote:
<br>&gt;  
<br>&gt; Thanks for your response.  
<br>&gt;  
<br>&gt; The reason this doesn't work is due to Swift's generic system as it allows a type T to be a anything, including arrays. The example that was used to delineate this concept to me was that of "Any...", which from within the variadic function, could be interpreted as T or [T]. The result is ambiguous in the current implementation, which is why some identifier syntax needs be passed along with an array to get this to work properly.
<br>&gt;  
<br>&gt; As for the choice of operator, I'm open to suggestions. I wanted to use one that was familiar to other developers, so I chose the one that Ruby uses.  
<br>&gt;  
<br>&gt; Maybe a ~ would be better, or a keyword like @variadic?
<br>&gt;  
<br>
<br>I was thinking of a second type (VariadicArray&lt;T&gt;, perhaps) which you received in the body of your function instead of Array, and which was not supported via … sequence (so no args: VariadicArray&lt;T&gt;… allowed). However, it looks like this type would have to be fixed, not allowing for protocol compliance (including Any)
<br>
<br>Would it be possible to automatically take a function which uses T… and generate the [T] argument version of the function? Today, I just implement the [T] variant and have the T… function do nothing but call it.
<br>
<br>-DW</div></div></span></blockquote></body></html>