<html><head><meta http-equiv="Content-Type" content="text/html charset=gb2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="" style="font-family: Arial; font-size: 14px; background-color: rgb(255, 255, 255);"><a href="https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000182.html" _src="https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000182.html" class="">https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000182.html</a></div><div class="" style="font-family: Arial; font-size: 14px; background-color: rgb(255, 255, 255);">you can go for detail. it is for Swift 3.</div><div class="" style="font-family: Arial; font-size: 14px; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="font-family: Arial; font-size: 14px; background-color: rgb(255, 255, 255);">and swift-evolution should be open mind. Since it ask us to make proposals.</div><div class="" style="font-family: Arial; font-size: 14px; background-color: rgb(255, 255, 255);"><br class=""></div><div style=""><blockquote type="cite" class=""><div class="">在 2016年8月11日,11:15,Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>> 写道:</div><br class="Apple-interchange-newline"><div class="">I don't know if the core team feels differently now with respect to Swift 4, but union types are listed as a "commonly rejected change":<br class=""><br class=""><a href="https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md" class="">https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md</a><br class=""><br class="">Is there anything in your proposal that goes beyond previous discussions on the topic?<br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Aug 10, 2016 at 21:59 Cao, Jiannan via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><span style="font-family:'PingFang SC'" class="">It is no a mistake. since </span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">fn1: (A</span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">|</span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">B)</span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">-></span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">Void </span><span style="font-size:10.5pt;font-family:'PingFang SC'" class="">is subtype of fn0: </span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">A</span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">-></span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;background-color:rgba(255,255,255,0)" class="">Void</span><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""> </span></div><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="font-family:'PingFang SC'" class=""><br class=""></div><div style="font-family:'PingFang SC'" class=""><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class="">Detail explain:</span></div><div style="font-family:'PingFang SC'" class=""><br class=""></div><div style="font-family:'PingFang SC'" class=""><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class="">var</span> <span style="background-color:rgba(255,255,255,0)" class="">fn0: A</span><span style="background-color:rgba(255,255,255,0)" class="">-></span><span style="background-color:rgba(255,255,255,0)" class="">Void</span> <span style="background-color:rgba(255,255,255,0)" class="">=</span> <span style="background-color:rgba(255,255,255,0)" class="">{</span><span style="background-color:rgba(255,255,255,0)" class="">print</span><span style="background-color:rgba(255,255,255,0)" class="">($0)} </span></div></div></div></div></div></div><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class="">var</span> <span style="background-color:rgba(255,255,255,0)" class="">fn1: (A</span><span style="background-color:rgba(255,255,255,0)" class="">|</span><span style="background-color:rgba(255,255,255,0)" class="">B)</span><span style="background-color:rgba(255,255,255,0)" class="">-></span><span style="background-color:rgba(255,255,255,0)" class="">Void</span> <span style="background-color:rgba(255,255,255,0)" class="">=</span> <span style="background-color:rgba(255,255,255,0)" class="">{</span><span style="background-color:rgba(255,255,255,0)" class="">print</span><span style="background-color:rgba(255,255,255,0)" class="">(v0)} </span></div></div></div></div></div><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class="">let a = A()</span></div><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class="">let b = B()</span></div><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class=""><br class=""></span></div><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><span style="background-color:rgba(255,255,255,0)" class="">So:</span></div><div style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class=""><br class=""></div><div style="font-family:'PingFang SC'" class=""><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class="">fn0( a ) // this is OK </span></div><div style="font-family:'PingFang SC'" class=""><span style="font-size:10.5pt;font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class="">fn1( a ) // this is also OK</span></div><div style="font-family:'PingFang SC'" class=""><br class=""></div><div style="font-family:'PingFang SC'" class=""><span style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif" class="">fn1 is subtype of fn0, because </span><span style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;font-size:10.5pt" class="">fn1 can do anything fn0 do.</span></div><div style="font-family:'PingFang SC'" class=""><span style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;font-size:10.5pt" class="">Thus fn0 = fn1 is OK.</span></div><div style="font-family:'PingFang SC'" class=""><span style="font-family:Helvetica,Tahoma,Arial,PingFang,苹方,'Hiragino Sans GB',冬青黑体,'Microsoft YaHei',微软雅黑,SimSun,宋体,STXihei,华文细黑,Heiti,黑体,sans-serif;font-size:10.5pt" class=""><br class=""></span></div><div style="font-family:'PingFang SC'" class=""><font face="Helvetica, Tahoma, Arial, PingFang, 苹方, Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, SimSun, 宋体, STXihei, 华文细黑, Heiti, 黑体, sans-serif" class="">But:</font></div><div style="font-family:'PingFang SC'" class=""><font face="Helvetica, Tahoma, Arial, PingFang, 苹方, Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, SimSun, 宋体, STXihei, 华文细黑, Heiti, 黑体, sans-serif" class=""><br class=""></font></div><div style="font-family:'PingFang SC'" class=""><font face="Helvetica, Tahoma, Arial, PingFang, 苹方, Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, SimSun, 宋体, STXihei, 华文细黑, Heiti, 黑体, sans-serif" class="">fn1( b ) // this is OK</font></div><div style="font-family:'PingFang SC'" class=""><font face="Helvetica, Tahoma, Arial, PingFang, 苹方, Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, SimSun, 宋体, STXihei, 华文细黑, Heiti, 黑体, sans-serif" class="">fn0( b ) // this is not OK</font></div><div style="font-family:'PingFang SC'" class=""><br class=""></div><div style="font-family:'PingFang SC'" class=""><font face="Helvetica, Tahoma, Arial, PingFang, 苹方, Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, SimSun, 宋体, STXihei, 华文细黑, Heiti, 黑体, sans-serif" class="">So fn0 is not subtype of fn1</font></div></div></div></div></div><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div style="zoom:1" class=""></div><div class=""></div><div class=""><br class=""></div>At 2016-08-11 10:41:02, "Step C" <<a href="mailto:schristopher@bignerdranch.com" target="_blank" class="">schristopher@bignerdranch.com</a>> wrote:<br class=""> <blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid" class=""><div class=""></div><div class="">Shouldn't it be "fn1 = fn0"? Same for the fn2 statements. </div><div class=""><br class=""></div><div class="">`<span style="background-color:rgba(255,255,255,0)" class="">var</span><span style="background-color:rgba(255,255,255,0)" class=""> fn0: A</span><span style="background-color:rgba(255,255,255,0)" class="">-></span><span style="background-color:rgba(255,255,255,0)" class="">Void</span><span style="background-color:rgba(255,255,255,0)" class=""> </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> {</span><span style="background-color:rgba(255,255,255,0)" class="">print</span><span style="background-color:rgba(255,255,255,0)" class="">(v0)} </span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""></span><span style="background-color:rgba(255,255,255,0)" class="">var</span><span style="background-color:rgba(255,255,255,0)" class=""> fn1: (A</span><span style="background-color:rgba(255,255,255,0)" class="">|</span><span style="background-color:rgba(255,255,255,0)" class="">B)</span><span style="background-color:rgba(255,255,255,0)" class="">-></span><span style="background-color:rgba(255,255,255,0)" class="">Void</span><span style="background-color:rgba(255,255,255,0)" class=""> </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> {</span><span style="background-color:rgba(255,255,255,0)" class="">print</span><span style="background-color:rgba(255,255,255,0)" class="">(v0)} </span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""><br class=""></span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""> fn0 </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> fn1 </span><span style="background-color:rgba(255,255,255,0)" class="">// OK, because Original Type and Union Type has a sub-typing relationship</span><span style="background-color:rgba(255,255,255,0)" class="">
</span><span style="background-color:rgba(255,255,255,0)" class="">var</span><span style="background-color:rgba(255,255,255,0)" class=""> </span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""><br class=""></span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class="">fn2: (A</span><span style="background-color:rgba(255,255,255,0)" class="">|</span><span style="background-color:rgba(255,255,255,0)" class="">B</span><span style="background-color:rgba(255,255,255,0)" class="">|</span><span style="background-color:rgba(255,255,255,0)" class="">C)</span><span style="background-color:rgba(255,255,255,0)" class="">-></span><span style="background-color:rgba(255,255,255,0)" class="">Void</span><span style="background-color:rgba(255,255,255,0)" class=""> </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> {</span><span style="background-color:rgba(255,255,255,0)" class="">print</span><span style="background-color:rgba(255,255,255,0)" class="">($</span><span style="background-color:rgba(255,255,255,0)" class="">0</span><span style="background-color:rgba(255,255,255,0)" class="">)} </span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""><br class=""></span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""> fn0 </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> fn2 </span><span style="background-color:rgba(255,255,255,0)" class="">// OK</span><span style="background-color:rgba(255,255,255,0)" class=""> </span></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""> fn1 </span><span style="background-color:rgba(255,255,255,0)" class="">=</span><span style="background-color:rgba(255,255,255,0)" class=""> fn2 </span><span style="background-color:rgba(255,255,255,0)" class="">// OK`</span></div><div class=""><br class="">On Aug 10, 2016, at 9:28 PM, Cao Jiannan via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div class="">Hi all,</div><div class=""><br class=""></div><div class="">I want to make a discussion about union type for swift 4.</div><div class="">See <a href="https://github.com/frogcjn/swift-evolution/blob/master/proposals/xxxx-union-type.md" target="_blank" class="">https://github.com/frogcjn/swift-evolution/blob/master/proposals/xxxx-union-type.md</a></div><div class=""><br class=""></div><div class=""><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)" class="">Add union type grammar, represents the type which is one of other types.</p><div style="margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><pre style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span style="color:rgb(167,29,93)" class="">var</span> stringOrURL: <span style="color:rgb(0,134,179)" class="">String</span> <span style="color:rgb(167,29,93)" class="">|</span> URL <span style="color:rgb(167,29,93)" class="">=</span> <span style="color:rgb(24,54,145)" class=""><span class="">"</span><a href="https://www.apple.com/" target="_blank" class="">https://www.apple.com</a><span class="">"</span></span></pre></div><div class=""><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)" class="">Now, if we using the new union type feature, we can declare type conveniently, No other type declaration, and compiler will automatically calculate the common interface.</p><div style="margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><pre style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span style="color:rgb(167,29,93)" class="">func</span> <span style="color:rgb(121,93,163)" class="">input</span>(value: A <span style="color:rgb(167,29,93)" class="">|</span> B <span style="color:rgb(167,29,93)" class="">|</span> C) {
<span style="color:rgb(0,134,179)" class="">print</span>(value<span style="color:rgb(167,29,93)" class="">.</span>commonProperty) <span style="color:rgb(150,152,150)" class="">// type checker will calculate the common interface, developer just use it out of box</span>
<span style="color:rgb(167,29,93)" class="">switch</span> value {
<span style="color:rgb(167,29,93)" class="">case</span> <span style="color:rgb(167,29,93)" class="">let</span> value <span style="color:rgb(167,29,93)" class="">as</span> A:
<span style="color:rgb(150,152,150)" class="">// value is type A</span>
<span style="color:rgb(0,134,179)" class="">print</span>(value<span style="color:rgb(167,29,93)" class="">.</span>propertyInA)
<span style="color:rgb(167,29,93)" class="">case</span> <span style="color:rgb(167,29,93)" class="">let</span> value <span style="color:rgb(167,29,93)" class="">as</span> B:
<span style="color:rgb(150,152,150)" class="">// value is type B</span>
<span style="color:rgb(0,134,179)" class="">print</span>(value<span style="color:rgb(167,29,93)" class="">.</span>propertyInB)
<span style="color:rgb(167,29,93)" class="">case</span> <span style="color:rgb(167,29,93)" class="">let</span> value <span style="color:rgb(167,29,93)" class="">as</span> C:
<span style="color:rgb(150,152,150)" class="">// value is type C</span>
<span style="color:rgb(0,134,179)" class="">print</span>(value<span style="color:rgb(167,29,93)" class="">.</span>propertyInC)
}
<span style="color:rgb(150,152,150)" class="">// there is no default case other than A, B or C. we already declared that.</span>
}</pre></div><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)" class="">Note: A, B, C can be either class or protocol, or any other types. This leaves developer more freedom.</p><div class=""><br class=""></div><div class=""><h2 style="margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';background-color:rgb(255,255,255)" class="">Impact on existing code</h2><ul style="padding-left:2em;margin-top:0px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255);margin-bottom:0px!important" class=""><li class="">This is a new feature, developer who need declare common type will alter to this new grammar.</li><li style="margin-top:0.25em" class="">Enum based version optional or IUO will be replaced by Union-based ones. Any optional type will automatically replaced by union type</li></ul><div class=""><br class=""></div></div><h2 style="margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';background-color:rgb(255,255,255)" class=""><a href="https://github.com/frogcjn/swift-evolution/blob/master/proposals/xxxx-union-type.md#detailed-design" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank" class=""></a></h2></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></blockquote></div></div></div><br class=""><br class=""><span title="neteasefooter" class=""><div class=""> <br class="webkit-block-placeholder"></div></span>_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></body></html>