# Difficulties with promoting numbers

**URL:** <https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009>\
**Category:** Internals & Design\
**Created:** [May 19, 2018, 2:04am UTC](https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009 "2018-05-19T02:04:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 19, 2018, 1:04pm UTC](https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009/4 "2018-05-19T13:04:55Z")

</div>

> [@"Meaning", type-piracy, and method merging](https://discourse.julialang.org/t/meaning-type-piracy-and-method-merging/11003/19):
>
> Unfortunately not: I use packages X and Y, not knowing about either MyPackage nor YourPackage, and the authors of X and Y know nothing about each other. X uses MyPackage, Y uses YourPackage, and I get into trouble.

No, then who wrote the `YourNumber(5) + MyNumber(3)`?

> [@"Meaning", type-piracy, and method merging](https://discourse.julialang.org/t/meaning-type-piracy-and-method-merging/11003/19):
>
> A = Any; for i=1:10 push!(A, MyPackage.MyNumber(i)) end; for i=11:20 push!(A,YourPackage.YourNumber(i)) end;

Oh hey look, this code knows both numbers, so whoever wrote that knows both. To find an actual counter example, you’d have to write a code that never has both `MyPackage` and `YourPackage` in the same scope… otherwise yes, you can write code that doesn’t magically always work but that’s not surprising or non-local.

---

_[View the full topic](https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009)._
