# How To Properly Use Unitful

**URL:** https://discourse.julialang.org/t/how-to-properly-use-unitful/40295
**Category:** General Usage
**Tags:** question, unitful
**Created:** [May 27, 2020, 10:24pm UTC](https://discourse.julialang.org/t/how-to-properly-use-unitful/40295 "2020-05-27T22:24:24Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![ajkeller34](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ajkeller34/32/4416_2.png) [@ajkeller34](https://discourse.julialang.org/u/ajkeller34)
#### Post date: [June 15, 2020, 4:57am UTC](https://discourse.julialang.org/t/how-to-properly-use-unitful/40295/12 "2020-06-15T04:57:04Z")

</div>

Late to the thread, but fyi, there’s something sneaky being done here to keep Unitful types from being exceedingly long when printed, which is something people have disliked in the past. The `cm^-3` inside the type signature is actually this:

```julia
julia> Unitful.Unit{:Meter, u"𝐋"}(-2,-3)
cm⁻³

```

The `Unitful.Unit` type is never manipulated by the user and is for internal use only. Having Unitful types show in a succinct way that still yields enough information to construct the type at the REPL has proven challenging. I think a step in the right direction would be to at least distinguish the two `cm` objects by having the internal one display differently, to avoid pulling a fast one on everyone. Sorry for that.

If you find yourself wanting to manipulate Unitful types directly, there’s almost always a better way. I would follow Tim’s advice here. You could consider restricting to `cm^-3` in the constructor if desired, though I’m not sure why you would need to do that.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-properly-use-unitful/40295)._
