# Alias for a macro

**URL:** <https://discourse.julialang.org/t/alias-for-a-macro/6615>\
**Category:** New to Julia\
**Created:** [October 22, 2017, 7:27pm UTC](https://discourse.julialang.org/t/alias-for-a-macro/6615 "2017-10-22T19:27:37Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Shuhua](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuhua/32/27618_2.png) [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Post date:** [July 24, 2020, 5:39am UTC](https://discourse.julialang.org/t/alias-for-a-macro/6615/9 "2020-07-24T05:39:51Z")

</div>

Despite this old thread, perhaps it deserves to mention that a more convenient way is to use the `var"name"` syntax introduced in Julia 1.3.

```julia
julia> var"@myassert" = var"@assert";
julia> @myassert 1 + 1 == 3 "wrong equation"
ERROR: AssertionError: wrong equation

```

See [here](https://discourse.julialang.org/t/string-as-a-variable-name/2195/21) and [this Stackoverflow](https://stackoverflow.com/questions/50084877/how-to-alias-a-macro-in-julia) for details.

---

_[View the full topic](https://discourse.julialang.org/t/alias-for-a-macro/6615)._
