# Deprecate keyword argument

**URL:** https://discourse.julialang.org/t/deprecate-keyword-argument/33740
**Category:** New to Julia
**Tags:** question
**Created:** [January 24, 2020, 12:19pm UTC](https://discourse.julialang.org/t/deprecate-keyword-argument/33740 "2020-01-24T12:19:16Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)
#### Post date: [June 22, 2023, 7:58pm UTC](https://discourse.julialang.org/t/deprecate-keyword-argument/33740/3 "2023-06-22T19:58:04Z")

</div>

I just made a package for doing this here: [GitHub - MilesCranmer/DeprecateKeywords.jl: Macro for deprecating keyword parameters](https://github.com/MilesCranmer/DeprecateKeywords.jl)

Described in this thread: [Standard way to deprecate a keyword argument](https://discourse.julialang.org/t/standard-way-to-deprecate-a-keyword-argument/100534)

```julia
using DeprecateKeywords

@deprecate_kws function foo(;
    new_kw1=2,
    new_kw2=3,
    @deprecate(old_kw1, new_kw1),
    @deprecate(old_kw2, new_kw2)
)
    new_kw1 + new_kw2
end

```

---

_[View the full topic](https://discourse.julialang.org/t/deprecate-keyword-argument/33740)._
