# Typed equality comparison

**URL:** <https://discourse.julialang.org/t/typed-equality-comparison/30736>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 5, 2019, 9:45am UTC](https://discourse.julialang.org/t/typed-equality-comparison/30736 "2019-11-05T09:45:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phg/32/17184_2.png) [@phg](https://discourse.julialang.org/u/phg)\
**Post date:** [November 5, 2019, 9:45am UTC](https://discourse.julialang.org/t/typed-equality-comparison/30736/1 "2019-11-05T09:45:36Z")

</div>

Is there any existing function (in Base or standard libraries) to do essentially the following:

```julia
≅(x::T, y::T) where {T} = x == y
≅(x, y) = false

```

?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 5, 2019, 10:18am UTC](https://discourse.julialang.org/t/typed-equality-comparison/30736/2 "2019-11-05T10:18:36Z")

</div>

I don’t think there is a function specifically for this, but as you have shown, is easy to define one. Cf

```julia
typeof(x) === typeof(y)

```
