# Addition to parameter of parametric type

**URL:** <https://discourse.julialang.org/t/addition-to-parameter-of-parametric-type/20059>\
**Category:** General Usage\
**Tags:** parametric-types\
**Created:** [January 24, 2019, 8:14pm UTC](https://discourse.julialang.org/t/addition-to-parameter-of-parametric-type/20059 "2019-01-24T20:14:26Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 25, 2019, 8:44am UTC](https://discourse.julialang.org/t/addition-to-parameter-of-parametric-type/20059/9 "2019-01-25T08:44:09Z")

</div>

One issue I have with Julia’s type parameters, related to this, is that some of them are part of the public API and some of them are private. For above example `A` might be public, but `B` isn’t. Another one is:

```julia
julia> typeof(1.0:0.1:0.9)
StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}

```

Where the first parameter is public (you would potentially use it for dispatch) but the second two are internal ones (I think calculated from the first somehow but I’m not sure).

It would be nice if it was possible to distinguish between the two somehow and hide the private parameters. In particular when declaring `struct`s with fields for, e.g. float-ranges, one has to handle those private parameters:

```julia
struct MyT{F,_F1,_F2}
  fr:StepRangeLen{F, Base.TwicePrecision{_F1},Base.TwicePrecision{_F2}}
end

```

even though one doesn’t care at all about them.

x-ref: [https://github.com/JuliaLang/julia/issues/18466#issuecomment-274442844](https://github.com/JuliaLang/julia/issues/18466#issuecomment-274442844)

---

_[View the full topic](https://discourse.julialang.org/t/addition-to-parameter-of-parametric-type/20059)._
