<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=""><blockquote type="cite" class=""><div class="">On 15 Apr 2016, at 03:22, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" class=""></blockquote></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="">The heterogeneity that I'm referring to is the mix of sub-trees and leaves at a single level.</div></div></blockquote><div class="">… which is why I was making the point that that part of the heterogeneity problem is solved.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">Your JSON literal example is already pretty well modeled by simply making a JSONValue type that conforms to all the literal protocols. It is completely unclear why you would even want to model this with some generic Tree structure. </div></blockquote>Because JSON has the structure of a tree. A dictionary of the type `[String:AnyObject]` does not express that structure even if at run-time it turns out that some of those any-objects are themselves dictionaries. `Tree<String, JSONValue>`, in contrast, precisely expresses the structure of JSON objects. `[String:JSONValue]` is flat so it is not worth talking about, whilst some dedicated `JSON` enum is just that, a dedicated type that is the symptom of a language incapable of representing things like `[1, [2]]` as such. </div><div class=""><br class=""></div><div class="">You do have a good point about conforming JSONValue type to the literal-convertible protocols. That is important here because it reminds us that the question of converting Int and String values to JSONValue type in my example is a completely separate issue from my proposal. This in turn shows that the two tree literal-convertable protocols I’d love to see added to the Standard Library would be sufficient in all cases. For instance (assuming the code from my original post is already in the context):</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);" class="">enum</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> JSONValue {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);" class="">case</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> Integer(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);" class="">Int</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Text(</span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);" class="">case</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> URL(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);" class="">NSURL</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class=""> string: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">) {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> url = </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">NSURL</span><span style="font-variant-ligatures: no-common-ligatures" class="">(string: string) {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class=""> = .</span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">URL</span><span style="font-variant-ligatures: no-common-ligatures" class="">(url)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>} </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">else</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class=""> = .</span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Text</span><span style="font-variant-ligatures: no-common-ligatures" class="">(string)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div><div style="margin: 0px; line-height: normal; min-height: 15px;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></font></div><div style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> : </span><span style="font-variant-ligatures: no-common-ligatures" class="">UnicodeScalarLiteralConvertible</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(unicodeScalarLiteral value: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">) { </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(value) }</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div><div style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> : </span><span style="font-variant-ligatures: no-common-ligatures" class="">ExtendedGraphemeClusterLiteralConvertible</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(extendedGraphemeClusterLiteral value: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">) { </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(value) }</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div><div style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> : </span><span style="font-variant-ligatures: no-common-ligatures" class="">StringLiteralConvertible</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(stringLiteral value: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">){ </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(value) }</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div><div style="margin: 0px; line-height: normal; min-height: 15px;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></font></div><div style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> : </span><span style="font-variant-ligatures: no-common-ligatures" class="">IntegerLiteralConvertible</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(integerLiteral value: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Int</span><span style="font-variant-ligatures: no-common-ligatures" class="">) { </span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class=""> = .</span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Integer</span><span style="font-variant-ligatures: no-common-ligatures" class="">(value) }</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div><div style="margin: 0px; line-height: normal; min-height: 15px;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> city: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures" class=""> = .</span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Text</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #64961d" class="">"New York"</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span></font></div><div style="margin: 0px; line-height: normal; min-height: 15px;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></font></div><div style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> johnny: </span><span style="font-variant-ligatures: no-common-ligatures" class="">DictionaryTree</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><</span><span style="font-variant-ligatures: no-common-ligatures" class="">String</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span><span style="font-variant-ligatures: no-common-ligatures" class="">JSONValue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">> =</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">[</font></span></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"name"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures" class="">"Johnny Appleseed"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"age"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">25</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"github"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures" class="">"<a href="http://github.com/apple/swift-evolution" class="">http://github.com/apple/swift-evolution</a>"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"address"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: [</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"number"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">21</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"street"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures" class="">"2nd Street"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">"city"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #91540f" class="">◊</span><span style="font-variant-ligatures: no-common-ligatures; color: #8f793a" class="">city</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>]</font></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">]</font></span></div></div><div class=""><br class=""></div><div class="">This is what we can do already (try it in the playground - even the url is read as a url). However, if we were also given the following protocol:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> DictionaryTreeLiteralConvertible {</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(200, 172, 229);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> Key</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(200, 172, 229);" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> LeafValue</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(literal: </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Self</span><span style="font-variant-ligatures: no-common-ligatures" class="">.LeafValue...)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #c8ace5" class="">init</span><span style="font-variant-ligatures: no-common-ligatures" class="">(literal: (Key, </span><span style="font-variant-ligatures: no-common-ligatures; color: #49a2d2" class="">Self</span><span style="font-variant-ligatures: no-common-ligatures" class="">)...)</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font face="Menlo" size="2" class="">}</font></span></div></div><div class=""><br class=""></div><div class="">… then the lifting of the JSONValue-s into the recursive world of trees would be done by the `init(literal: Self.LeafValue…)` and we would no longer need the lifting operator ◊.</div><div class=""><br class=""></div><div class="">Finally, it is worth mentioning that the two proposed protocols, TreeLiteralConvertible and DictionaryTreeLiteralConvertible, should be simple to implement, would not affect existing code, and would allow us to work with all kinds of trees and nested associative arrays with ease, safety and elegance we are growing accustomed to when programming in Swift.</div><div class=""><br class=""></div><div class="">milos</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 15 Apr 2016, at 03:22, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class="">On Apr 14, 2016, at 2:56 PM, Milos Rankovic <<a href="mailto:milos@milos-and-slavica.net" class="">milos@milos-and-slavica.net</a>> wrote:</div><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi John and Brent, <div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 14 Apr 2016, at 22:22, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-family: -webkit-standard; font-size: inherit; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">multiple-conformance idea doesn't work</span></div></blockquote></div><div class=""><br class=""></div><div class="">The idea is not multiple-conformance (or overloading), but multiple (two) initialisers required by the literal-convertible protocols:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; line-height: normal;"><font size="2" face="Menlo" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">protocol</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>TreeLiteralConvertible {</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(200, 172, 229);"><font size="2" face="Menlo" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">associatedtype</span><span class=""><span class="Apple-converted-space"> </span>LeafValue</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font size="2" face="Menlo" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">init</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(literal:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Self</span><span class="" style="font-variant-ligatures: no-common-ligatures;">.LeafValue...)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font size="2" face="Menlo" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">init</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(literal:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Self</span><span class="" style="font-variant-ligatures: no-common-ligatures;">...)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font size="2" face="Menlo" class="">}</font></span></div></div><div class=""><br class=""></div><div class="">… and:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">protocol</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>DictionaryTreeLiteralConvertible {</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(200, 172, 229);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">associatedtype</span><span class=""><span class="Apple-converted-space"> </span>Key</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(200, 172, 229);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">associatedtype</span><span class=""><span class="Apple-converted-space"> </span>LeafValue</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">init</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(literal:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Self</span><span class="" style="font-variant-ligatures: no-common-ligatures;">.LeafValue...)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">init</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(literal: (Key,<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Self</span><span class="" style="font-variant-ligatures: no-common-ligatures;">)...)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">}</font></span></div></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><span class="" style="font-size: inherit; display: inline !important;">Note that all of your examples rely not just on recursion but on heterogeneous recursion</span></blockquote><br class=""></div><div class="">The crux of the matter is not heterogeneity in general, but of the leaf value in particular. This is what Brent is addressing. All my examples, save one, had a uniform leaf value type (even the Tree<SKAction> example).</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">The heterogeneity that I'm referring to is the mix of sub-trees and leaves at a single level.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class="">The one exception is my second JSON example. There I did not post the lift operator overload as you can probably imagine it. Minimally:</div></div></div></div></blockquote><div class=""><br class=""></div>It's pretty implausible that we'd ever add a "tree literal" concept that serves exactly your use case, so I'm looking for ways to capture it that fit within the existing language framework, or at least take advantage of a more general addition to the language.</div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Your JSON literal example is already pretty well modeled by simply making a JSONValue type that conforms to all the literal protocols. It is completely unclear why you would even want to model this with some generic Tree structure. Note that neither your tree-literal-protocol proposal nor Brent's lifting-protocol proposal is actually adequate for embedding non-literal Int/Double/Bool values in the structure because they both only allow a single "leaf" type.</div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Your other examples could be modeled with either a lifting protocol or a conditional conformance. I was just noting that the conditional conformance would be adequate if you were willing to manually lift non-literal values, and conditional conformances are a feature that's already basically planned, as opposed to a new research project.</div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">John.</div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">enum</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>JSONValue {</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">case</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>Text(</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">String</span><span class="" style="font-variant-ligatures: no-common-ligatures;">)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">case</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>Integer(</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Int</span><span class="" style="font-variant-ligatures: no-common-ligatures;">)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">}</font></span></div><div class="" style="margin: 0px; line-height: normal; min-height: 15px;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"></span><br class=""></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">prefix</span><span class=""><span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">func</span><span class=""><span class="Apple-converted-space"> </span>◊ <Key> (leaf:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">String</span><span class="">) -><span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">DictionaryTree</span><span class=""><</span><span class="" style="font-variant-ligatures: no-common-ligatures;">Key</span><span class="">,<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">JSONValue</span><span class="">> {</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">return</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>.</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Leaf</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(.</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Text</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(leaf))</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">}</font></span></div><div class="" style="margin: 0px; line-height: normal; min-height: 15px;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"></span><br class=""></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">prefix</span><span class=""><span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">func</span><span class=""><span class="Apple-converted-space"> </span>◊ <Key> (leaf:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">Int</span><span class="">) -><span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">DictionaryTree</span><span class=""><</span><span class="" style="font-variant-ligatures: no-common-ligatures;">Key</span><span class="">,<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">JSONValue</span><span class="">> {</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">return</span><span class="" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>.</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Leaf</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(.</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(73, 162, 210);">Integer</span><span class="" style="font-variant-ligatures: no-common-ligatures;">(leaf))</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">}</font></span></div><div class="" style="margin: 0px; line-height: normal; min-height: 15px;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"></span><br class=""></font></div><div class="" style="margin: 0px; line-height: normal; min-height: 15px;"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"></span><br class=""></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(73, 162, 210);"><font face="Menlo" size="2" class=""><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(200, 172, 229);">let</span><span class=""><span class="Apple-converted-space"> </span>johnny:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">DictionaryTree</span><span class=""><</span><span class="" style="font-variant-ligatures: no-common-ligatures;">String</span><span class="">,<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">JSONValue</span><span class="">> =</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">[</font></span></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"name"</span><span class="">:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(145, 84, 15);">◊</span><span class="" style="font-variant-ligatures: no-common-ligatures;">"Johnny Appleseed"</span><span class="">,</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"age"</span><span class="">:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(145, 84, 15);">◊</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(255, 38, 0);">25</span><span class="">,</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">        </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"address"</span><span class="">: [</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">                </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"house_number"</span><span class="">:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(145, 84, 15);">◊</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(255, 38, 0);">21</span><span class="">,</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">                </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"street"</span><span class="">:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(145, 84, 15);">◊</span><span class="" style="font-variant-ligatures: no-common-ligatures;">"2nd Street"</span><span class="">,</span></font></div><div class="" style="margin: 0px; line-height: normal; color: rgb(100, 150, 29);"><font face="Menlo" size="2" class=""><span class=""><span class="Apple-tab-span" style="white-space: pre;">                </span></span><span class="" style="font-variant-ligatures: no-common-ligatures;">"city"</span><span class="">:<span class="Apple-converted-space"> </span></span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(145, 84, 15);">◊</span><span class="" style="font-variant-ligatures: no-common-ligatures;">"New York"</span></font></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>]</font></span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><font face="Menlo" size="2" class="">]</font></span></div></div><div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">Notice in particular how much contextual information you are getting from the expected return type. Still though, as Brent, points out, this won’t work with the two literal-convertable protocols. Nevertheless, I’d be very happy if they could be added as a first step since I suspect that would be the easiest option and one that would still allow for all my examples so far to work without the lift operator; all except this `JSONValue` example.</span></div><div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="">milos</div></div></div></div></blockquote></div></div></blockquote></div><br class=""></body></html>