# Partial specification of parameters for composite types

**URL:** <https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283>\
**Category:** New to Julia\
**Created:** [August 16, 2024, 6:02pm UTC](https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283 "2024-08-16T18:02:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![densmojd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/densmojd/32/206891_2.png) [@densmojd](https://discourse.julialang.org/u/densmojd)\
**Post date:** [August 16, 2024, 6:02pm UTC](https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283/1 "2024-08-16T18:02:07Z")

</div>

Today I learned:

```julia
julia> struct S{A,B} end
julia> s = S{Int, Float64}()
S{Int64, Float64}()
julia> s isa S{Int}
true
julia> s isa S{Float64}
false

```

So I can drop trailing parameter specifications from a composite type and “automatically” generate an abstract type? Is this in the documentation anywhere?

---

<div class="post-metadata">

**Author:** ![mohamed.d180](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed.d180/32/52028_2.png) [@mohamed.d180](https://discourse.julialang.org/u/mohamed.d180)\
**Post date:** [August 16, 2024, 6:12pm UTC](https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283/2 "2024-08-16T18:12:04Z")

</div>

Here it’s ([More about types · The Julia Language](https://docs.julialang.org/en/v1/devdocs/types/#UnionAll-types)) .

This indicates that `Array` actually names a `UnionAll` type. There is one `UnionAll` type for each parameter, nested. The syntax `Array{Int,2}` is equivalent to `Array{Int}{2}` ; internally each `UnionAll` is instantiated with a particular variable value, one at a time, outermost-first. This gives a natural meaning to the _omission_ of trailing type parameters; `Array{Int}` gives a type equivalent to `Array{Int,N} where N` .
