# Claim (false): Julia isn't multiple dispatch but overloading

**URL:** <https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370>\
**Category:** General Usage\
**Tags:** multidispatch\
**Created:** [July 1, 2020, 1:55pm UTC](https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370 "2020-07-01T13:55:00Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 1, 2020, 7:18pm UTC](https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370/41 "2020-07-01T19:18:43Z")

</div>

> [@PetrKryslUCSD](#):
>
> Well, multiple dispatch as defined in the Julia manual is distinguished by dispatch on the types of _all_ arguments. This is in contrast to dispatch based on the type of the first argument only.

I don’t believe that’s the main confusion.

The issue/different from “overloading” is that in C++ there’s also the concept of compile time type in additional to the runtime/true type of the object. It is indeed much closer in concept with static vs dynamic dispatch (at least some meaning of it).

FWIW, I’ve seen dynamic vs static dispatch to mean either a compiler optimization vs the use of compile time/runtime type so the confusion is understandable. In the context of julia though, compile time type simply do not exist and the meaning of static vs dynamic dispatch is reasonably clear.

Not as much in C++, where you have the use of compile time (overload, multiple argument) vs runtime (virtual function, single argument) in the language spec and also compiler optimization (devirtualization) to call virtual function statically.

And that’s why I said this absense of compile time type is the only difference and the main confusion. C++ style overload simply can’t exist without it and if one tries to look for such thing one can easily confuse it with the real type of the object (due to compiler optimization/specialization) and then conclude that multiple dispatch is just overloading.

---

_[View the full topic](https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370)._
