# Intransitivities in subtyping

**URL:** <https://discourse.julialang.org/t/intransitivities-in-subtyping/109266>\
**Category:** Internals & Design\
**Created:** [January 22, 2024, 2:33pm UTC](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266 "2024-01-22T14:33:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![foobar\_lv2](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Post date:** [January 23, 2024, 2:13pm UTC](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266/5 "2024-01-23T14:13:35Z")

</div>

> [@nsajko](#):
>
> This is even worse than it looks at first, because `SubStr == Direct`. So it’s not so much a counterexample for transitivity, as it is a basic logical error:

`A == B` between types is implemented as `A <: B && B <: A`, and I don’t think that `Direct <: SubStr` makes it worse? We’d like subtyping to be transitive, or objects with `A==B` to be exchangeable when tested with `<:`, but failure of that is not a _logical_ error.

But it would be a quite catastrophic logical error if we had a practical distinction between some `A` and `B` with `A === B`.

> [@A most harrowing collection of Julia WATs](https://discourse.julialang.org/t/a-most-harrowing-collection-of-julia-wats/77323/102):
>
> This thread has been going on for 2 years and has become an unorganized grab-bag of unrelated discussions. As such, it’s a prime case for [Time limits for unfocused discourse threads?](https://discourse.julialang.org/t/time-limits-for-unfocused-discourse-threads/106739).

👍 but maybe split off the parts of discussion that are still ongoing? I don’t feel like the ongoing discussion has gone bad yet.

That is only very slightly related to the 2 year old parts and should have been a new thread instead of necroing the old one.

---

_[View the full topic](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266)._
