# Parametric type

**URL:** <https://discourse.julialang.org/t/parametric-type/33487>\
**Category:** New to Julia\
**Tags:** question, parametric-types\
**Created:** [January 17, 2020, 12:43pm UTC](https://discourse.julialang.org/t/parametric-type/33487 "2020-01-17T12:43:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [January 17, 2020, 12:43pm UTC](https://discourse.julialang.org/t/parametric-type/33487/1 "2020-01-17T12:43:42Z")

</div>

Is it possible to write a parametric type with default type?

```julia
struct Point{T}
    x::T
    y::T
end

struct Foo
    a::Point{Float64}
    b::Point # should be the default type: Point{Float64}
    c::Point{Int}
end

```

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [January 17, 2020, 12:48pm UTC](https://discourse.julialang.org/t/parametric-type/33487/2 "2020-01-17T12:48:38Z")

</div>

No, not as written. `b::Point` already means something: it means `b` can have a type which is `Point{T}` for any `T`. You could consider doing:

```julia
const PointF = Point{Float64}

struct Foo
  b::PointF
  ...

```

which is only slightly more verbose.
