Syntactic sugar for types

IMO, it’s unlikely to be accepted in the base language. See a long discussion here: Proposed alias for union types - #17 by stevengj

I think the main reason that these proposals have come up only recently, more than a decade into Julia’s development, is type1 | type2 syntax has recently been adopted and popularized in Python. But “spell things more like Python” has never been a huge priority for Julia, especially in cases like this where we have a longstanding existing syntax as well as a longstanding resistance to “punning” (having an operator like | mean two completely different things).

1 Like