# Alias two macros

**URL:** https://discourse.julialang.org/t/alias-two-macros/113028
**Category:** General Usage
**Created:** [April 16, 2024, 4:41pm UTC](https://discourse.julialang.org/t/alias-two-macros/113028 "2024-04-16T16:41:16Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![bertschi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bertschi/32/33462_2.png) [@bertschi](https://discourse.julialang.org/u/bertschi)
#### Post date: [April 16, 2024, 5:26pm UTC](https://discourse.julialang.org/t/alias-two-macros/113028/4 "2024-04-16T17:26:29Z")

</div>

Yes, macros can interact in unexpected way when each of them transforms the expression in some way (see [here](https://discourse.julialang.org/t/zero-based-indexing-not-again/100944/8) for an example).  
Yet, when inserting another macro into its expansion, the outer macro has control over the syntax and just needs to ensure that its valid for the inner one, i.e., that the generated code makes sense and works as expected. In this case, it should be rather straight-forward as the expression is just passed as is:

```julia
macro ha(expr)
    esc(:(LoopVectorization.@tturbo Base.@. $expr))
end

```

The only difficulty seems to be that macro names in the expansion are not automatically namespaced like function names, i.e., hygienic. Hence, the need to do this by hand and escaping the expression.

---

_[View the full topic](https://discourse.julialang.org/t/alias-two-macros/113028)._
