<div dir="ltr">I agree that the probably isn&#39;t a better story for literals and Sets and that I wish that there were a better story.<div><br></div><div>The best that I can think of is some sort of flag outside of the Array literal, for instance, #[&quot;A&quot;, &quot;B&quot;, &quot;C&quot;] or just using keys that people aren&#39;t already accustomed to like option-&#39;\&#39; and option-shift-&#39;\&#39;.  «&quot;A&quot;, &quot;B&quot;, &quot;C&quot;]»</div><div><br></div><div><br></div><div>TJ</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 4:55 PM, Greg Parker via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Jan 18, 2016, at 2:55 PM, Howard Lovatt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><div><br><blockquote type="cite">On Tuesday, 19 January 2016, Jack Lawrence &lt;<a href="mailto:jackl@apple.com" target="_blank">jackl@apple.com</a>&gt; wrote:</blockquote></div></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></span><span class=""><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On Jan 18, 2016, at 2:50 PM, Liam Butler-Lawrence via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Set(&quot;a&quot;, &quot;b&quot;, &quot;c”) doesn’t compile. It currently has to be  Set(arrayLiteral: &quot;a&quot;, &quot;b&quot;, &quot;c”). That said, I’d be satisfied with removing the external parameter name “arrayLiteral”. Not only is it unnecessary, but it’s confusing too: variadic parameters are not the same as an Array.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></span><span class=""><blockquote type="cite"><div><blockquote type="cite">init(arrayLiteral:) is there to satisfy ArrayLiteralConvertible. Set([“a”, “b”, “c”]) works just fine.</blockquote></div></blockquote><blockquote type="cite"><br></blockquote></span></div><span class=""><div><blockquote type="cite">Sure, but you could add another overload without the label.<br></blockquote></div><div><br></div></span>Only if you break existing code. Consider this expression:<div><br></div><div>    Set([&quot;a&quot;, &quot;b&quot;])</div><div><br></div><div>Is this</div><div>1. a Set&lt;String&gt; with two elements &quot;a&quot; and &quot;b&quot;</div><div>2. a Set&lt;Array&lt;String&gt;&gt; with one element [&quot;a&quot;, &quot;b&quot;]</div><div><br></div><div>Currently it means #1. You could change it to mean #2, but that breaks existing code that expects #1. You could try to overload the no-name initializer, but that will be confusing to humans in some cases.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>-- </div><div>Greg Parker     <a href="mailto:gparker@apple.com" target="_blank">gparker@apple.com</a>     Runtime Wrangler</div><div><br></div><div><br></div></font></span></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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>
<br></blockquote></div><br></div>