# The Unreasonable Efficiency and Effectiveness of Multiple Dispatch: Your Favourite Examples

**URL:** https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477
**Category:** General Usage
**Tags:** question, multiple-dispatch
**Created:** [September 17, 2024, 3:07am UTC](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477 "2024-09-17T03:07:25Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)
#### Post date: [September 17, 2024, 3:19am UTC](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477/2 "2024-09-17T03:19:11Z")

</div>

[This thread](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554)’s scope largely overlaps with this one 😅, but doesn’t necessarily point to actionable output, and doesn’t purpose to many examples.

Examples shared there:

- [Julia’s native `AbstractArray` type hierarchy is used pretty much everywhere without much fuss](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554/6). (Some do [experience otherwise](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554/14) though).
- Python’s built-in complex type is only for floats, c.f. Julia’s ability to define complex types over any other `Real` `isbits` subtypes, and for function methods to be efficiently defined for parametric subtypes effectively (I added that last point).

And some caveats on preaching multiple dispatch:

- [Different packages working together through APIs is not a novel concept](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554/10). EDIT: This point is my misinterpretation of @Benny’s explanation in the link, which [he kindly clarifies below](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477/11). The composability is arguably easier to accomplish in Julia c.f. other languages.
- Composability, especially in comparison between languages, [is difficult to measure](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554/14).

---

_[View the full topic](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477)._
