# Syntactic sugar for types

**URL:** <https://discourse.julialang.org/t/syntactic-sugar-for-types/119685>\
**Category:** General Usage\
**Created:** [September 21, 2024, 10:09pm UTC](https://discourse.julialang.org/t/syntactic-sugar-for-types/119685 "2024-09-21T22:09:27Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 22, 2024, 6:28pm UTC](https://discourse.julialang.org/t/syntactic-sugar-for-types/119685/8 "2024-09-22T18:28:34Z")

</div>

> [@andrey2185](#):
>
> I mean to do pull request in julia with this code

IMO, it’s unlikely to be accepted in the base language. See a long discussion here: [Proposed alias for union types - #17 by stevengj](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205/17)

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).

---

_[View the full topic](https://discourse.julialang.org/t/syntactic-sugar-for-types/119685)._
