# Zero and zerounit, analogous to one and oneunit?

**URL:** https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841
**Category:** Internals & Design
**Tags:** unitful
**Created:** [February 21, 2022, 2:07pm UTC](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841 "2022-02-21T14:07:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [February 21, 2022, 2:07pm UTC](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841/1 "2022-02-21T14:07:49Z")

</div>

Following this reasoning, shouldn’t we also have `zerounit` for consistency? `zero` can be defined as the additive identity.

I find it very strange that we need to write code with a mix of `oneunit` and `zero` instead of `oneunit` and `zerounit`.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [February 21, 2022, 2:15pm UTC](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841/2 "2022-02-21T14:15:25Z")

</div>

> [@juliohm](#):
>
> Following this reasoning, shouldn’t we also have `zerounit` for consistency? `zero` can be defined as the additive identity.

`zero` _is_ defined as the additive identity in Julia. This is a unitful quantity, hence no need for `zerounit`.

Originally, Julia had just `one` (multiplicative identity) and `zero` (additive identity). But then people started mis-using `one` for unitful quantities to get the unit ([julia#16116](https://github.com/JuliaLang/julia/issues/16116)), so we introduced `oneunit` to disambiguate. There is no similar need for `zerounit`.

See also [Revise `zero` and define `zerounit`? · Issue #24853 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/24853) and [Change `one` to `onemult` · Issue #36103 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/36103) for related naming discussions.

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [February 21, 2022, 2:24pm UTC](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841/3 "2022-02-21T14:24:57Z")

</div>

Very interesting discussions. Thanks for the links.
