# Can I subtype "Type" ? If so how?

**URL:** <https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017>\
**Category:** General Usage\
**Created:** [November 12, 2019, 7:55pm UTC](https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017 "2019-11-12T19:55:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Post date:** [November 12, 2019, 7:55pm UTC](https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017/1 "2019-11-12T19:55:24Z")

</div>

Topic says it all. I would like to do something like:

```julia
struct MySpecialType{T<:Type} <: Type{T}
end 

```

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 13, 2019, 2:24am UTC](https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017/2 "2019-11-13T02:24:48Z")

</div>

Types can only be subtypes of abstract types. I think `Type` is concrete right? I’m sure the answer is somewhere [in here](https://docs.julialang.org/en/v1/manual/types/index.html), but that page is long and I’ve read it probably 3 or 4 times in the last couple of years and still haven’t grasped all of the complexity.

That said, can you say more about what you’re actual use case is? It’s possible that there’s a way to accomplish what you want to do, just not in this specific way.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [November 13, 2019, 3:36am UTC](https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017/3 "2019-11-13T03:36:00Z")

</div>

`Type` is not a real type, it is neither concrete nor abstract.  
It is a special magic thing for dispatch purposes.

Unlike `DateType` which is is the type of types and is concreete

(`Type` also matches dispatch with `UnionAlls` i.e. parametric types with free parameters. (where as `DataType` does not))

Things that make it special  
It is a parametric super-type of `DataType`,  
but `DataType` is not parameteric – that is not allowed.

And linked to this information kind of jumps over the `DataType` step:

```julia
julia> Int isa DataType
true

julia> Int isa Type{Int}
true

julia> DataType <: Type{Int}
false

julia> supertype(DataType)
Type{T}

```

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [November 13, 2019, 7:38am UTC](https://discourse.julialang.org/t/can-i-subtype-type-if-so-how/31017/4 "2019-11-13T07:38:00Z")

</div>

> [@oxinabox](#):
>
> `Type` is not a real type, it is neither concrete nor abstract.

```julia
julia> isconcretetype(Type)
false

julia> isabstracttype(Type)
true

```

Is this wrong, then ?
