<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=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 9 janv. 2018 à 06:40, Nevin Brackett-Rozinsky via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">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></div></div></div></blockquote><br class=""></div><div>DictionaryLiteral is worthwhile. The SQLite library GRDB uses DictionaryLiteral in order to build database rows (which may have duplicated column names, and whose column ordering is important). This is mostly useful for tests:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">&nbsp; &nbsp;&nbsp;<span style="color: #ba2da2" class="">let</span> row = <span style="color: #ba2da2" class="">try</span> Row.fetchOne(db, <span style="color: #d12f1b" class="">"SELECT 1 AS a, 2 AS a"</span>)!</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">&nbsp; &nbsp; XCTAssertEqual(row, [<span style="color: #d12f1b" class="">"a"</span>: <span style="color: #272ad8" class="">1</span>, <span style="color: #d12f1b" class="">"a"</span>: <span style="color: #272ad8" class="">2</span>])</div><div class=""><br class=""></div></div>Gwendal</body></html>