# How to deprecate a macro?

**URL:** <https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651>\
**Category:** General Usage\
**Created:** [November 17, 2018, 6:44pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651 "2018-11-17T18:44:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [November 17, 2018, 6:44pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/1 "2018-11-17T18:44:57Z")

</div>

I was wondering, is there a way to `@deprecate` a macro instead of a function? If so, what’s the syntax?

---

<div class="post-metadata">

**Author:** ![oliver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliver/32/19264_2.png) [@oliver](https://discourse.julialang.org/u/oliver)\
**Post date:** [December 11, 2018, 4:12pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/2 "2018-12-11T16:12:04Z")

</div>

Did you happen to find a solution for this?

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [December 11, 2018, 4:33pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/3 "2018-12-11T16:33:11Z")

</div>

No, I didn’t, so far. ☹

---

<div class="post-metadata">

**Author:** ![thautwarm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thautwarm/32/37760_2.png) [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Post date:** [May 8, 2020, 12:55pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/4 "2020-05-08T12:55:24Z")

</div>

you might just access ` __source__ ` and ` __module__ ` to create warnings youself?

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [May 8, 2020, 1:09pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/5 "2020-05-08T13:09:16Z")

</div>

I guess - I had hoped there might be a simpler way. 🙂

---

<div class="post-metadata">

**Author:** ![thautwarm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thautwarm/32/37760_2.png) [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Post date:** [May 8, 2020, 1:12pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-macro/17651/6 "2020-05-08T13:12:50Z")

</div>

yep, I searched several times these days and found this post again and again, also have such an expectation.  
however we’d notice this is quite simple, that might be why they’re not in Stdlib.
