[Pitch] Narrowed Any

They're great, but they're a superset of the functionality of "Narrowed Any", which previously got a ton of love here when called "anonymous sum types".

Both tuples and structs have always been in the language. If we have this:

struct S { var a: Int, b: String }
typealias T = (a: Int, b: String)

Then we should have this:

enum E { case a(Int), b(String) }
typealias T = (a: Int | b: String)
6 Likes