<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=""><div class="">I don’t have any experience working in a language with structural sum types but I think inference of structural sums in different branches of a conditional would lead to a lot of bugs and potential confusion. Before considering support of such inference I would want to see pretty compelling evidence that it adds value and doesn’t lead to problems.</div><div class=""><br class=""></div><div class="">In absence of allowing this inference, the structural sum could be specified manually if that is what is intended.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 12, 2015, at 12:48 PM, Thorsten Seitz via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Am 10.12.2015 um 20:59 schrieb John McCall via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>>:</div><div class=""><div style="" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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;" class="">Also, are we allowed to *infer* structural sums? For example, can we decide that the type of (x ? A() : B()) is A+B if that’s the greatest common type? </span></div></div></blockquote><div class=""><br class=""></div>That’s what Ceylon does.</div><div class=""><br class=""></div></div><div class="">-Thorsten</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAd-2FvVbEurwkGNVkzgfItWy615W6UqffInB23gYTGn1cUuZgRiPwJVzCEMjNQdMj7q78HoPdAj96Z-2BoD8O65Hl1NJB4l79HKR5XfYzghCCFsJQ-2FFseB4xRaeTMn3IVq2wMEgtmV5kTPzWKgEIl0CnyLnBFEKsx0ZN5UEa3UR1UFm-2B8AmNEg5Sjh7S5agUmK8R9o-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>