# Forcing type declaration in Julia

**URL:** https://discourse.julialang.org/t/forcing-type-declaration-in-julia/69095
**Category:** General Usage
**Tags:** type
**Created:** [October 2, 2021, 6:08am UTC](https://discourse.julialang.org/t/forcing-type-declaration-in-julia/69095 "2021-10-02T06:08:42Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [October 2, 2021, 7:51am UTC](https://discourse.julialang.org/t/forcing-type-declaration-in-julia/69095/6 "2021-10-02T07:51:53Z")

</div>

Curious - I seem to remember there being a problem with some of them 🤔

Ah, I think it was this thread:

> [@Unitful.jl and DifferentialEquations.jl: compatibility?](https://discourse.julialang.org/t/unitful-jl-and-differentialequations-jl-compatibility/68594/7):
>
> The function signature should be twoBodyNew(t, y, μ, dy) . It’s always ((du),u,p,t) . The docs on that linked page have been fixed[.](https://www.prepaidgiftbalance.vip/www-prepaidgiftbalance-com/)

Specifically, this:

> [@Unitful.jl and DifferentialEquations.jl: compatibility?](https://discourse.julialang.org/t/unitful-jl-and-differentialequations-jl-compatibility/68594/12):
>
> [https://github.com/PainterQubits/Unitful.jl/issues/46#issuecomment-265611553](https://github.com/PainterQubits/Unitful.jl/issues/46#issuecomment-265611553) The code shown in the comment assumes that the number and its inverse have the same type, assumption which fails when the unit dimension is encoded in the type domain, which is what Unitful.jl does. Another approach would be to have a type which doesn’t embed the unit and unit dimension in the type as parameters, which is what Chris would prefer.

Though that’s orthogonal to limiting types per se, so I must have mixed the two up.

---

_[View the full topic](https://discourse.julialang.org/t/forcing-type-declaration-in-julia/69095)._
