# Counterexamples to the interpretation \`\<:\` means "is a subtype of"

**URL:** <https://discourse.julialang.org/t/counterexamples-to-the-interpretation-means-is-a-subtype-of/57274>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [March 16, 2021, 8:24am UTC](https://discourse.julialang.org/t/counterexamples-to-the-interpretation-means-is-a-subtype-of/57274 "2021-03-16T08:24:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sostock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sostock/32/5546_2.png) [@sostock](https://discourse.julialang.org/u/sostock)\
**Post date:** [March 16, 2021, 9:06am UTC](https://discourse.julialang.org/t/counterexamples-to-the-interpretation-means-is-a-subtype-of/57274/2 "2021-03-16T09:06:54Z")

</div>

> [@path-doc](#):
>
> Any suggestions on how to reconcile?

In my opinion, there is nothing to reconcile: `<:` is the subtyping relation and `subtypes(T)` and `supertypes(T)` simply don’t show you _all_ objects for which `S <: T` or `T <: S` holds, because that’s not possible in general. How would they accomplish that? Both `subtypes` and `supertypes` would need to return arrays with an infinite number of elements in that case. For example, `subtypes(Ptr)` would have to return an array containing `Ptr{Float64}`, `Ptr{String}`, `Ptr{Ptr{String}}`, … really all `Ptr{T}` for every possible `T`. And `supertypes(Float64)` would have to return `Union{Float64, String}`, `Union{Float64, Nothing}`, … also infinitely many values. Therefore, they are not useful for determining actual subtyping relations (except in some cases), that’s what `<:` is for.

---

_[View the full topic](https://discourse.julialang.org/t/counterexamples-to-the-interpretation-means-is-a-subtype-of/57274)._
