<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><blockquote type="cite"><div><div dir="ltr"><div>// require value to be of type Bool OR Double OR String OR SomeProtocol</div><div><font face="monospace, monospace">let value: (Bool | Double | String | SomeProtocol)</font></div><div><font face="monospace, monospace">switch value {</font></div><font face="monospace, monospace"> case let _ as Bool: …</font><div><font face="monospace, monospace"> case let _ as Double: …<br class=""> case let _ as String: …<br class=""> case let _ as SomeProtocol: …</font></div><div><font face="monospace, monospace"> // no default necessary<br></font><div><font face="monospace, monospace">}</font></div></div></div></div></blockquote><br><div>This is a structural union type which has received considerable discussion with commentary from core team members already in the with a subject something like "STL and Either". You may be interested in reading that discussion. The summary is that we are unlikely to see it without extremely compelling use cases.</div></body></html>