# Why can't we merge Missing and Nothing?

**URL:** <https://discourse.julialang.org/t/why-cant-we-merge-missing-and-nothing/25793>\
**Category:** Internals & Design\
**Created:** [June 28, 2019, 10:03am UTC](https://discourse.julialang.org/t/why-cant-we-merge-missing-and-nothing/25793 "2019-06-28T10:03:59Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 4, 2019, 7:12am UTC](https://discourse.julialang.org/t/why-cant-we-merge-missing-and-nothing/25793/16 "2019-07-04T07:12:06Z")

</div>

> [@HFriberg-mosek](#):
>
> Let me illustrate what bothers me about having to distinguish “has a value, but it is unknown” and “has no value” in programming

You should not think of `nothing` and `missing` as solutions that cover all possible scenarios. They are intended to work in some very common ones, but you are free to design your own more elaborate extensions or alternatives — what’s nice about Julia is that they will be given equal treatment (compiler optimizations, etc).

API design and data encoding are both hard problems. You should think of Julia not as a solution, but as a toolbox to iteratively build a solution.

As for your particular questions: it is hard to say more without context, but

1. I would not define `NameOfSister` at all. Perhaps a `siblings` accessor, the elements of which I could then query with `name` and `gender`, which could return `missing`.

2. For optional arguments, I would use `nothing` if that would take me to a different branch (explicitly, in the code), `missing` if I wanted to rely on generics. But that’s just my own style and I don’t follow it consistently.

3. I would not define `isconvex` and `ishalting` at all, because I don’t know how to implement them (for generic objects). In fact, I would not define function return types at all, that’s what we have a compiler for.

---

_[View the full topic](https://discourse.julialang.org/t/why-cant-we-merge-missing-and-nothing/25793)._
