# Proposed alias for union types

**URL:** <https://discourse.julialang.org/t/proposed-alias-for-union-types/108205>\
**Category:** Internals & Design\
**Tags:** question, proposal\
**Created:** [December 31, 2023, 1:43pm UTC](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205 "2023-12-31T13:43:56Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [January 1, 2024, 5:40pm UTC](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205/19 "2024-01-01T17:40:38Z")

</div>

> [@stevengj](#):
>
> no one has even aired a desire for an alternate syntax to my knowledge

I couldn’t find anything either. And that is exactly why I made this thread! This isn’t a concrete proposal, I’m just interested in discussing the idea and testing the waters.

Regarding @StefanKarpinski’s thread, I want to emphasize that the idea discussed here is not to change any existing syntax: it’s to add a new method, which I would think (?) is compatible with Julia 1.x’s syntax freeze –

> [@PSA: Julia is not at that stage of development anymore](https://discourse.julialang.org/t/psa-julia-is-not-at-that-stage-of-development-anymore/44872/1):
>
> We can add new syntax, new functions, new names, new methods, etc. but we can’t change the existing ones (at least not the ones that are exported and documented).

So, `Union{...}` would still be the type, this is just a new alternative for constructing them. (An analagous situation happened for Python 3.9 → 3.10 [[here](https://peps.python.org/pep-0604/)] when they introduced `|` as an alternative to their existing `Union[]` type hint, which happens to also be bitwise-or for bools and integers.) It’s not a breaking change, just a new method. Since `|` _currently_ throws an error on `::Type` input, this would not affect existing code.

---

_[View the full topic](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205)._
