# A precise definition of what it means to be an instance of an abstract type

**URL:** <https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [March 16, 2021, 7:45am UTC](https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270 "2021-03-16T07:45:56Z")\
**Posts on this page:** 3\
**Page:** 3

<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:** [March 17, 2021, 3:04pm UTC](https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270/41 "2021-03-17T15:04:34Z")

</div>

> [@Jeff\_Emanuel](#):
>
> for example, `d = Dict{String,Float64}()` . Would that be proper?

Yes of course, that’s the way to do it. But that’s a call to a parametric constructor, and has little to do with this topic.

---

<div class="post-metadata">

**Author:** ![path-doc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/path-doc/32/19183_2.png) [@path-doc](https://discourse.julialang.org/u/path-doc)\
**Post date:** [March 18, 2021, 3:00am UTC](https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270/42 "2021-03-18T03:00:57Z")

</div>

> [@Tamas\_Papp](#):
>
> these types are organized into a tree, with `<:` ,

Well, it is a graph, and intransitivities are view as bugs, but it would be inaccurate to call (X , \<:) a tree. In fact, it is not even intended to be a tree. I think it is intended to be a bounded lattice (with `Any` and the top and `Union{}` at the bottom). Thus, unlike a tree, the induced _undirected_ graph therefore has cycles everywhere (even if we rule out intransitive bugs).

> But seeing a `Type` outside a method signature is code smell, and integrating `Type` and `DataType` into your mental map of Julia types is just a recipe for a headache.

I have a [proof](https://discourse.julialang.org/t/what-is-difference-between-type-t-and-t/19325/53) that concrete types form tree though. (Thanks to that mathematical mindset.) So actually, the only part of the type structure that doesn’t give me a headache is the concrete type tree (which has DataType at as its root and is formed via compositions of `typeof`).

PS. Unfortunately, when you have that mindset, there is nothing you can do to give it up. It usually pays off in the end though.

---

<div class="post-metadata">

**Author:** ![path-doc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/path-doc/32/19183_2.png) [@path-doc](https://discourse.julialang.org/u/path-doc)\
**Post date:** [March 18, 2021, 11:32pm UTC](https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270/44 "2021-03-18T23:32:39Z")

</div>

Thanks very much for pointing this out:

> [@Tamas\_Papp](#):
>
> … This is not super-helpful for dispatch, so `Type{T}` was introduced as a _selector_ — the [updated manual](https://docs.julialang.org/en/v1.6-dev/manual/types/#man-typet-type) makes this more clear. But seeing a `Type` outside a method signature is code smell,

Will try to digest.

[Previous page](https://discourse.julialang.org/t/a-precise-definition-of-what-it-means-to-be-an-instance-of-an-abstract-type/57270.md?page=2)
