# What was the motivation behind Julia's staging (specialization, macro, generated function, etc.) systems design?

**URL:** <https://discourse.julialang.org/t/what-was-the-motivation-behind-julias-staging-specialization-macro-generated-function-etc-systems-design/139978>\
**Category:** Internals & Design\
**Tags:** staging\
**Created:** [October 13, 2026, 3:08am UTC](https://discourse.julialang.org/t/what-was-the-motivation-behind-julias-staging-specialization-macro-generated-function-etc-systems-design/139978 "2026-10-13T03:08:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 13, 2026, 5:05am UTC](https://discourse.julialang.org/t/what-was-the-motivation-behind-julias-staging-specialization-macro-generated-function-etc-systems-design/139978/2 "2026-10-13T05:05:31Z")

</div>

> [@Tarny\_GG\_Channie](#):
>
> Why does Julia need so many distinct staging systems?

As you yourself said, each occurs at a different time and has different information (as well as a different level of abstraction) and hence can do different things well.

It’s like asking why a camera system has so many components: lenses, sensors, image synthesis from sensor readings, compression, maybe even post-processing like inference and reconstruction tasks.

I’m not going to go into specifics here, because you didn’t ask a very specific question. Loads have been written on what macros are ([and aren’t](https://discourse.julialang.org/t/how-to-warn-new-users-away-from-metaprogramming/35022)) good for (e.g. domain-specific syntax), on what generated functions are good for (e.g. low-level type-based high-performance code generation), what dispatch is good for (e.g. [solving the expression problem](https://www.youtube.com/watch?v=kc9HwsxE1OY)), the cases where you want runtime `eval` (e.g. interactive coding), and so on.

(As [we’ve often commented to you](https://discourse.julialang.org/t/my-issues-with-julia-and-how-i-aim-to-fix-it-and-probably-fail/135810/17), extremely broad and unfocused topics are discouraged here because they usually lead to uninformative, time-wasting threads.)

---

_[View the full topic](https://discourse.julialang.org/t/what-was-the-motivation-behind-julias-staging-specialization-macro-generated-function-etc-systems-design/139978)._
