<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I used a DictionaryLiteral only yesterday, and it turned what would have a typically unreadable array of Structs into something much more elegant. I'm pretty sure the only reason Literals (of all varieties) aren't used more often is because Swift programmers don't realize they are available and easy to implement.&nbsp;<br><br>Sent from my telephone</div><div><br>On Jan 8, 2018, at 9:40 PM, Nevin Brackett-Rozinsky via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 8, 2018 at 11:53 PM, Xiaodi Wu 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank you for the clarification. It occurred to me in the shower that this might be the case, and that I was entirely mistaken as to what we were talking about.<br><br>Yes, then, I wholeheartedly agree on this point. Out of curiosity, why are there source stability issues to 'typealias DictionaryLiteral&lt;Key, Value&gt; = [(Key, Value)]'?</blockquote><div><br></div><div>Because at the point of use, “DictionaryLiteral” is instantiated with an actual dictionary literal, eg. “[a: 1, b: 2, c: 3]”, and that syntax isn’t available for an array of key-value pairs. As near as I can tell, the convenience of that spelling is the entire&nbsp;<i>raison-d’être</i> for “DictionaryLiteral” in the first place.</div><div><br></div><div>The ulterior question of whether preserving “DictionaryLiteral”&nbsp;is worthwhile, is apparently out of scope. Personally, I have a hard time imagining a compelling use-case outside of the standard library, and I doubt it’s being used “in the wild” (I checked several projects in the source-compatibility suite and found zero occurrences).</div><div><br></div><div>Nevin</div></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>